Chapter 3: Converting HTML to XHTML
In This Chapter
Discovering the advantages of XHTML
Converting your HTML to XHTML
Learning the rules
Working with HTML Tidy
Chapter Outline
- Why are most people converting?
- Ringside with HTML and XHTML
- Converting to XHTML by Hand
- Nest tags correctly
- Always include optional ending tags
- Quote attribute values
- Lowercase all element and attribute names
- Attribute name-value pairs cannot stand alone
- Open and close an element in the same tag
- Include a DOCTYPE declaration
- Include an XML namespace within <html>
- Include the <head> and <body> elements
- Wrap your script and style elements
- Take a look at an example
- Converting with HTML Tidy
Previous Chapter | Next Chapter