XHTML
Tips for the easy transition from HTML [?] to XHTML [?]. XHTML is the latest standard for coding web sites.
Lowercase tags :
All tags should be written in lowercase letters.
Example:
Wrong:
<A HREF="contact.html"><IMG SRC="mailbox.gif" ALT="Contact Details"></A>
Correct:
<a href="contact.html"><img src="mailbox.gif" alt="Contact Details"></a>
Quotation marks :
Enclose all values of attributes in quotation marks.
Example:
WYSIWYG [?] editors often omit quotation marks for numerical values :
<img src="images/logo.gif" width=213 height=85 border=0</a>
Correct mark-up :
<img src="images/logo.gif" width="213" height="85" border="0"</a>
Close all tags :
In HTML many tags, such as the paragraph tag <p>
, did not require a closing tag (</p>
). In XHTML all tags must be closed, either with the appropriate closing tag (even where older W3C guidelines state that a closing tag is optional) or with a trailing slash (where before a closing tag was prohibited).
Examples:
The closing tag for paragraphs and for list items used to be optional:
<p>this is a paragraph</p>
<ul>
<li>list item</li>
<li>list item</li>
</ul>
Sometimes closing tags are prohibited. In this case a close-command slash is added at the end of the tag.
<img src="image.gif" />
<br />
Learn more :
A list of relevant links can be found in the Resource section.
Related Issues
[ Browsers ]
[ Usability ]
[ Writing for the web ]
[ Information Architecture ]
[ Submitting documents for web publication ]
[ XHTML ]
| Access Guide Home | Table of Contents | Definitions | Glossary |