W3C Compliance ensures that your webpage is as per the defined standards of W3C. This helps the search engine crawlers to analyse and index your sites quicker and efficiently.
1. All the tags should be closed properly
Forgetting to do so won’t just invalidate the HTML, it might also be the cause of some serious layout problems. The warning for this in the W3C validator is the cryptic message like:
end tag for “p” omitted, but OMITTAG NO was specified
2. Missing “/” on self closing elements
Most HTML elements have a separate closing tag, eg: </div>, but other elements like input, img and meta are self closing, this means they have a trailing slash before their closing bracket. Forgetting this is just the same as forgetting a closing tag altogether.
3. No ALT attribute added to images
Every image inserted into the HTML document should have an ALT attribute to describe its contents.
4. Tags should be nested properly
All the tags should be properly nested. For e.g. instead of writing
The correct way of writing this is:
5. Starting a class or ID with number