Answering Service >
Call Center Resource >
Web Development and Promotion >
Web Development >
Practical XHTML
Practical XHTML
by
Peter Sawczynec
This explanation is specifically geared to aid a web developer gain enough practical XHTML (Extensible Hypertext Markup Language) to start using XHTML promptly. If you would like a full technical explanation of what XHTML is as it relates to its XML and SGML heritage, go to the W3C site and follow the XHTML link. Browsers processing HTML typically will gracefully accept coding errors and still display the gross page content. Browsers are designed to be more strict when processing XHTML. Essentially, XHTML code must be well-formed. For daily use, this translates to:
[ ] tag names have to be correct [ ] tag attributes and their values have to be correct [ ] non-empty tags must be opened and closed correctly [ ] tag nesting must be correct [ ] header information is expected to be there and must be correct
XHTML is meant to improve the quality, reliability and interoperability of all web code and should be used.
What Makes Well-formed XHTML Heres the practical nitty-gritty. The XHTML document must be well-formed by these XML rules: XML is case sensitive. All element tag names and attribute names must be lowercase. E.g. is not valid. is valid. Non-empty elements must have closing tags. E.g.:
text is not valid,
text is valid. Further,
is not valid to create a paragraph break,
is valid. Allowed empty elements must end with a space and a final forward slash. E.g.
is not valid,
is not correct,
is correct.
is correct. The extra space ensures that 4.0 version browsers do not choke on the XHTML tags. All attribute values must be "quoted". E.g.
|