After going through a lot of articles and this post, i know Why doctypes are used for and also about the different modes triggered by the browser like standards, quirks etc.
I downloaded the a strict doctype from this url – http://www.w3.org/TR/html4/strict.dtd but couldn’t understand a thing of what is written inside it.
My question is, if i want to write a page with html and css which is going to have a doctype that will trigger standards mode, where can i get a clear and simple to understand list of all the rules(for instance, elements and attributes that i should avoid) that my html and css code should adhere to?
From the specification itself: http://www.w3.org/TR/html401/ The DTD itself is harder to read because it’s written in a spec language, Backus–Naur Form, and not plain English. Backus-Naur is worth learning if you truly want to be sure of the exact meaning of the spec.
It’s OK to move on to the newer version of the doctype <!DOCTYPE html>
as it sets all browsers to standards mode and also makes the validator aware should you start using the new HTML5 elements. (Do not think of it as a “HTML5 doctype”.)
There isn’t anything you should avoid if it’s in the spec except those marked, there, as “deprecated”. If you want to future proof yourself, here is the list of differences with HTML5.
For that matter, here is the HTML5 “living standard”.