Tuesday, November 27, 2007

What Is XHTML?

• XHTML stands for EXtensible HyperText Markup Language
• XHTML is aimed to replace HTML
• XHTML is almost identical to HTML 4.01
• XHTML is a stricter and cleaner version of HTML
• XHTML is HTML defined as an XML application
• XHTML is a W3C Recommendation

XHTML is a combination of HTML and XML (EXtensible Markup Language).

XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML.

The Most Important Differences :

• 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

Some More XHTML Syntax Rules:

• 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

The 3 Document Type Definitions(DTD)

• DTD specifies the syntax of a web page in SGML.
• DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
• XHTML is specified in an SGML document type definition or 'DTD'.
• An XHTML DTD describes in precise, computer-readable language, the allowed syntax and grammar of XHTML markup.

Note : SGML (Standard Generalized Markup Language) is a standard for how to specify a document markup language or tag set.

There are currently 3 XHTML document types:
• STRICT
• TRANSITIONAL
• FRAMESET

STRICT

Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.

TRANSITIONAL
Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets.

FRAMESET
Use this when you want to use HTML Frames to partition the browser window into two or more frames.

Reference from and many thanks to following websites and articles: w3schools.

kick it on DotNetKicks.com

No comments: