#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

Support CodeSnail

If you appreciate my work, or if it has helped you along your journey. It would mean a lot to me if you could write a message on my wall and share a cup of coffee (or tea) with me.

Buy Me A Coffee
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.

Leave a Comment