Thursday, October 14, 2010


XHTML is not very different from the HTML 4.01 standard.So, bring your code up to 4.01 standard is a good start.

Given the fact that XHTML is an XML application, certain practices that were perfectly legal in SGML-based HTML 4 has been amended accordingly. You've already seen the XHTML syntax in the previous chapter, then the differences in XHTML and HTML are very clear:

XHTML documents must be well formed:
This means that all elements must have closing tags and all the elements must nest properly.
<p>XHTML documents must be well formed:</p>

Attribute names must be in lower case:
XHTML documents must use lower case for all the names of HTML elements and attributes. This distinction is necessary because the document is considered XML XHTML, XML, and uppercase and lowercase letters.
e.g. <p>.....</p>  

Document is a XHTML DOCTYPE declaration at the top of the document. 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


  All the attribute values must be quoted.

All attribute values must be quoted, even those which appear to be numeric.
<td rowspan="3">

No comments:

Post a Comment