Thursday, December 27, 2012

Practical differences in code, from HTML to XHTML

Practical differences in code, from HTML to XHTML
The following list summarizes the major code differences between HTML and XHTML: 

  • Including the processing instruction line (the XML prolog) is recommended, but not required:

  •  

  • Doctype declaration is required:

  •  

  • Namespace designation is required:

  •  

  • Html, head, body, and title elements are required:




  • Page Title 

      

  • Tags and attributes must be lowercase:

  •  

  • Attribute values must be quoted:

  • font-size="large" 

  • Non-empty tags must be terminated with a closing tag:

  • text
     

  • Empty tags (e.g., hr, br, img) must incorporate a slash:


  •  

  • Elements can't overlap—they must nest properly:

  • text 

No comments: