Sunday 15 September 2013

XHTML, Extensible Hypertext Markup Language

XTHTML ( Extensible Hypertext Markup Language) is the cleaner & Stricter version of HTML. Its similar to html 4.01 and supported by all major browsers.
Currently XHTML1.0 is used.



  1. DOCTYPE declaration is must in an XHTML page which is written at the top of the document.
  2. XHTML tags and attributes should be written in lower case only.
  3. Closing tags are compulsary.
  4. Values of attributes must be quoted.
  5. All Non-pair tags should be closed with slash. e.g(<img src="" />, <br />)
  6. All the tags should be properly nested.
  7. Use Id attribute instead on name in XHTML.                                                                                                                                                            
    Doctype used for XHTML is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


      <DIV></DIV> is wrong in XHTML.
use <div></div>

      <img src="" alt=""> is wrong in XHTML.
use <img src="" alt="" />

      <br> is wrong in XHTML.
use <br />

      <img src="" alt="" width=200> is wrong in XHTML.
use <img src="" alt="" width="200" />

      <p>This para is <b>bold</p></b> is wrong in XHTML
use <p>This para is <b>bold</b></p> 

No comments: