HTML Tags
Character Charts
CSS
Regular Expressions
PHP
Useful Tools
W3C Compliancy
1. Don't PanicSometimes one error will generate many error messages, so it's not always as bad as it looks. Also, the learning curve is encouraging – although the first documents you attempt to w3c-validate may be full of errors, you'll catch on pretty quickly.
 
2. Close tagsAll paired tags like html, body, head, table must be closed.
 
3. Self Closing TagsAll self-closing tags, such as br, hr, img, must have a "/" before the closing ">".
 
4. Use lowercaseAll tag and attribute names must be in lowercase (except, apparently, "!DOCTYPE").
 
5. Quote attributesAll attributes must be in quotes (single or double).
 
6. doctype The page must begin with a "doctype" tag. Here is what I use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
7. htmlNext, the "html" tag is required.
 
8. headNext, the "head" tag is required.
 
9. charsetIn the "head" section, a meta tag defining the character set is required. Here is what I typically use:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>.
If the page is php, then you can put in your php code:
header("Content-type: text/html; charset=utf-8");
 
10. titleApparently, the "title" tag is required, since when I omitted it, I got an error message – that the head not closed! When put in title, it was valid!
 
11. scripttype="text/javascript" is required for script.
 
12. scriptNo script section may appear between the head and the body. Nor may it appear after the body – which I think is going to cause a lot of problems for me...!
 
13. styletype="text/css" is required for style.
 
14. styleNo style section may appear in the body – it must occur in the head section.
 
15. bodyThe following attributes are not supported: leftmargin, topmargin, rightmargin, bottommargin, marginwidth, marginheight.
To define the margins of your docment, use instead CSS: margin-left, margin-right, margin-top, margin-bottom.
 
16. styleThe "style" attribute may not appear twice for the same object.
 
17. imgAn img must have the "alt" attribute.
 
18. textareaA textarea must have the "rows" and "cols" attributes.
 
19. Child without parentA td or tr may not occur without defining a table;
an li may not occur without defining a ul or an ol; etc.
 
20. Character symbolsIn character symbols like &nbsp;, do not omit the ";".
 
21. Character symbolsA misspelled symbol, as in &nbbsp;, will generate an error.
 
22. &If you want an actual "&" in your text, then use "&amp;"; otherwise, you will get a warning.
If you have an & inside a URL, you get an actual error message! which seems silly to me.
 
23. Do not use &#150; for dash. Use &ndash; instead.
 
24. <A < anywhere, when not part of an actual tag definition, yields a warning – even in javascript! So in html, always use &lt; and put the contents of all scripts inside <!-- -->.
 
 
 
 
Check this page for W3C Compliancy
 
Top of Page