Page/Tag Properties
- Doctype: XHTML preferred:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">Where XHTML is not feasible, use HTML 4.01 Transitional:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> - Every document must have a doctype, html, head, and body
- All tags should be properly nested
- Indents – 2 spaces, no tab characters
- All files in a UNIX format, NOT DOS
- In XHTML, all tags must be closed, even those which are standalone:
<img /><br />
- When using xhtml (NOT html 4.01) declare a namespace in the html tag:
<html xmlns="http://www.w3c.org/1999/xhtml">
Leave a Reply