What is HTML ?

HTML is a language for describing web pages.

  • HTML stands for Hyper Text Markup Language
  • HTML is a markup language
  • A markup language is a set of markup tags
  • The tags describe document content
  • HTML documents contain HTML tags and plain text
  • HTML documents are also called web pages

What is XHTML ?

  • XHTML stands for EXtensible HyperText Markup Language
  • XHTML is almost identical to HTML 4.01
  • XHTML is a stricter and cleaner version of HTML 4.01
  • XHTML is HTML defined as an XML application
  • XHTML is supported by all major browsers.

A XHTML document is a document that has to be well-formed according to the rules of XML. Every tag has be closed and correctly nested, and for tags like img, input, link etc, a quick close slash should be added at the end of the tag, like this: <input type="text" />. If you’re writing code that should be accessible for people with Netscape 4 and some other web browsers, then make sure to have a space before the slash (Note: not to make it look good in Netscape 4, but to make it work at all).

Major differences in XHTML from html

Document Structure
    • XHTML DOCTYPE is mandatory
    • The XML namespace attribute in <html> is mandatory
    • <html>, <head>, <title>, and <body> is mandatory
XHTML Elements
    • XHTML elements must be properly nested
    • XHTML elements must always be closed
    • XHTML elements must be in lowercase
    • XHTML documents must have one root element
XHTML Attributes
    • Attribute names must be in lower case
    • Attribute values must be quoted
    • Attribute minimization is forbidden

<!DOCTYPE ….> Is Mandatory

An XHTML document must have an XHTML DOCTYPE declaration.


It totally depends on coder needs. Some people believe it to be very easy and consistent to code in its XML fashion, where everything has to be well-formed and every element has to be closed. Some people choose it to extend its functionality with namespaces, to use it in conjunction with MathML and so on. Other people might work with XHTML, not out of their own choice, but because the products they/their company use deliver XHTML.


Posted on January 24, 2013, in Web and tagged , , , , , . Bookmark the permalink. 1 Comment.

  1. “HTML Versus XHTML Super-Oxide Blog” seriously got me addicted with ur
    page! I reallydefinitely will be back again way more normally.
    Thank you -Frances

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: