#32 Difference between HTML and XHTML

XHTML meas Extensible HyperText Markup Language

XHTML is almost similar to HTML 4.0 this is very strict version of HTML. It is developed by (W3C) World Wide Web Consortium to help web developer’s transition easy.

Many times some codes of HTML will not work on all browsers so it is used.

DIFFERENCE BETWEEN HTML and XHTML

An XHTML document must have an XHTML <!DOCTYPE> declaration.

The <html>, <head>, <title>, and <body> elements must also be present, and the xmlns attribute in <html> must specify the xml namespace for the document.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Title of document</title>
</head>
<body>

  some content here...

</body>
</html>

Previous: #31 HTML Web Storage API

Leave a Comment

Copy link
Powered by Social Snap