Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.