Just today, I’m bugging around with this XHTML Strict validation. After making all pages pass the HTML Validator for Firefox (HTML Tidy), I noticed that some pages are in XHTML Transitional rather than Strict. This is what I saw in the validator window.
Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN"
Document content looks like XHTML 1.0 Transitional
It took me several hours (not focusing on it actually) and found out that I missed these important rules for XHTML 1.0 Strict:
- Anchor tag attribute “target ” is deprecated: Useful when we need to open new windows for some links but will not validate, so bad.
width
attribute on table cells are not allowed: Of course I know this but I forget sometimes- Form
name
attribute is not allowed - Form elements must be contained inside a block level element, not just the form itself: We can wrap them via
div
or any other block level element instead <br />
element must be directly contained in a block level element
So far it all validates now. Those little things that I kept on forgetting every time I develop web pages.