Coding vBulletin To Web Standards

D4rk Avenger

New Member
Who Defines Web Standards?
--------------------------------------------------
The World Wide Web Consortium (W3C) is an international consortium where member organizations, a full-time staff and the public work together to develop standards for the World Wide Web. W3C's stated mission is "To lead the World Wide Web to its full potential by developing protocols and guidelines that ensure long-term growth for the Web."

What is XHTML?
--------------------------------------------------
For further reading on what XHTML is please see XHTML 1.0: The Extensible HyperText Markup Language (Second Edition)

How Does This Involve Your vBulletin Forum?
--------------------------------------------------
vBulletin comes by default as XHTML 1.0 Transitional. Whenever you do modifications to your forum you want to keep in mind that you should adhear to atleast XHTML 1.0 Transitional standards.

What Are Common Mistakes Between HTML 4.0 and XHTML 1.0?
--------------------------------------------------
Some of the biggest mistakes I see people making are not properly closing tags.

Here are a few examples:
Non XHTML 1.0 Compliant


Code:
<br>

XHTML 1.0 Compliant

Code:
<br />

Non XHTML 1.0 Compliant


Code:
<img src="imagelocation.jpg">

XHTML 1.0 Compliant


Code:
<img src="imagelocation.jpg" alt="Description of image" />

Non XHTML 1.0 Compliant


Code:
<p>First New Paragraph
<p>Second New Paragraph

XHTML 1.0 Compliant


Code:
<p>First New Paragraph</p>
<p>Second New Paragraph</p>

Non XHTML 1.0 Compliant


Code:
<b><i>A sentence that is both italized and bolded but not closed properly</b></i>

XHTML 1.0 Compliant


Code:
<strong><em>A sentence that is both italized and bolded but not closed properly</em></strong>
Deprecated Code
--------------------------------------------------
Deprecated code is code that is no longer supported or recommended for use on XHTML 1.0 webpages.

<center>
The <center> tag is no longer supported as the correct way to center text or elements on your forum. To center in compliance with XHTML 1.0 use the following CSS code:


Code:
text-align: center;

<font>
This is another one that many people still use. Instead of using <font> use css to define font colors. If you want a certain text to be red use css or use the style attribute directly in the code (using a seperate CSS file and then using a class to call it is preferred as a way to keep your page smaller (less code) )
An example on how to make text red using style:


Code:
<span style="color: #910000;">This is red text</span>
Code:
<u>
There is really no need to use the underline attribute.

For a list of all other xhtml attributes see this: HTML 4.01 / XHTML 1.0 Reference
 
Top