04 Xhtml
-
STEP 1: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.
STEP 2:The problem with HTML
HTML started out as a way of describing the structure of documents, with tags to indicate headers, paragraphs, and the like.
Because people wanted to control the appearance of documents, HTML acquired tags to control fonts, alignment, etc.
The result is a markup language that does both, but isn’t very good at either.
STEP 3:From HTML to XHTML
(1)XHTML elements must be properly nested
(2)XHTML documents must be well-formed
(3)Tag names must be in lowercase
(4)All XHTML elements must be closed
(5)Attribute names must also be in lower case
(6)Attribute values must be quoted
(7)Attribute minimization is forbidden
(8)The id attribute replaces the name attribute
(9)Mandatory XHTML Elements
STEP 4:XHTML DTD
(1)Strict
Use for really clean markup, with no display information (no font, color, or size information).
Use with CSS (Cascading Style Sheets) if you want to define how the document should look.
(2)Transitional
Use with standard HTML and/or with CSS.
Allows deprecated HTML elements.
(3)Frameset
Use if your document uses HTML frames.