HTML has been the best way to create a Web site for many years. If you want to create well formed an HTML Web site you need to follow a few simple XHTML rules to move your Web site from HTML to XHTML. Don't worry, it's not as hard as it sounds.
- Add missing end tags - Whenever you use an HTML tag you must use the corresponding end tag that goes with it.
example: <p></p>; <b></b>; <li></li> - Make sure your HTML tags nest rather than overlap - Keep your HTML tags in order.
example of bad order: <p><b>this is bold</p></b>
example of good order: <p><b>this is bold</b></p> - Use double or single quotes around your attribute values.
bad example: <font face=sans-serif color=white size=+1>
good example: <font face="sans-serif" color="white" size="+1"> - Add values to all minimized Boolean attributes, even if they are the same name.
bad example: <input type="checkbox" checked>
good example: <input type="checkbox" checked="checked"> - Change &, < and > to &, < and > -
example: change "me & her" to "me & her" - Fix empty HTML elements.
example:<hr> should look like <hr/> or <hr></hr> - Use hyphens in comment tags
bad comment tag: <! this is a comment>
good comment tag: - Make all element and attribute names lowercase
- Eliminate all non-standard HTML elements like marquee
- Add requited attributes like the alt attribute of img
- Move HTML elements out of out from inside elements where they don't belong like blockquote from p

