Difference between XHTML and HTML Tag Structure

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.
  • The HTML tag must contain an XMLNS namespace attribute.
  • <html xmlns="http://www.w3.org/1999/xhtml">
  • XHTML is case sensitive. All tags and attributes are lower case.
  • xhtml:<p>Paragraph tag </p>
    html: <p>Paragraph tag </P>
  • Single or Empty tags must be closed with a slash ( /).
  • xhtml: <hr />   <br />   <img />   <meta />
    html: <hr>   <br>   <img>   <meta>
  • Xhtml is structured and well formed. All element tags must be properly nested.
  • xhtml: <li><b>One List item</b></li>
    html: <li><b>One List item</li></b>
  • All values and attributes are quoted.
  • xhtml: <img src="file.gif" />
    html: <img src=file.gif />
  • Attribute values are quoted and not minimized.
  • xhtml: <td nowrap="nowrap">Text</td>
    html: <td nowrap>Text</td>
  • Use id for fragment identifiers and NOT name.
  • xhtml: <frame id="happytimes">
    html: <frame name=happytimes>
  • Include Doctype Definition( DTD) at the beginning of each page.
  • 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
  • Web pages should meet Americans with Disabilities Act-ADA compliance
  • Challenges blind and visually impaired people, including graphics, forms, tables, animations, and the use of color; along with auditory challenged persons

  • Internet Web Broswers
  • Doris Cuffey, Instructor