XHTML (Extensible Hyper Text Markup Language): Its extended, cleaner and sticker version of HTML, almost identical to HTML4.0. It is based on XML application, so one can say its a combination of HTML and XML.
Basic difference between HTML and XHTML are:
- XHTML elements must be properly nested.
- XHTML elements must always be closed.
- XHTML elements must be in lower case.
- XHTML documents must have one root element.
XHTML syntax rules are:
- Attribute names must be in lower case.
- Attribute values must be quoted.
- Attribute minimization is forbidden.
- The id attribute replaces the name attribute.
- The XHTML DTD defines mandatory elements :Doctype declaration, html,head and body tags are mandatory in XHTML documents.
There are 3 types of XHTML DTD
- XHTML 1.1 Strict :for clean markup and free of presentational clutter. It declared as: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" - XHTML 1.1 Transitional : It is used when user want to use HTML presentational features. It declared as: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" - XHTML 1.1 Frameset : When HTML frames are used. It declared as: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
No comments:
Post a Comment