Difference between HTML and XHTML Languages

Extensible Hypertext Markup Language (XHTML) is a simplified version of the programming language XML (Extensible Markup Language).It uses HTML tags plus the strict coding (rules) of XML.

  1. XHTML is case sensitive. All tags and attributes are lower case.
  2. xhtml:<p>Paragraph tag </p> html: <p>Paragraph tag </P>
  3. Single or Empty tags must be closed with a slash ( /).
  4. xhtml: <hr />   <br />   <img />   <meta /> html: <hr>   <br>   <img>   <meta>
  5. Xhtml is structured and well formed. All element tags must be properly nested.
  6. xhtml: <li><b>One List item</b></li> html: <li><b>One List item</li></b>
  7. All values and attributes are quoted.
  8. xhtml: <img src="file.gif" /> html: <img src=file.gif />
  9. Attribute values are quoted and not minimized.
  10. xhtml: <td nowrap="nowrap">Text</td> html: <td nowrap>Text</td>
  11. Use id for fragment identifiers and not name.
  12. xhtml: <frame id="happytimes"> html: <frame name=happytimes>
  13. Include Doctype Definition( DTD) at the beginning of each page.
  14. xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> html: DTD was not used
  15. Web pages should meet Americans with Disabilities Act-ADA compliance
  16. Challenges blind and visually impaired people, including graphics, forms, tables, animations, and the use of color; along with auditory challenged persons

Web Design with XHTML Part I
Doris Cuffey, Instructor