I was reading about doctypes and I read about Strict and Transitional doctypes. There are some differences between them: like strict doctype does not support tags like font etc but, Transitional does. Now I am confused as to why we use the strict doctype if transitional supports all tags. Then why do we need to use Strict doctype? Is there any reason for that?
I was reading about doctypes and I read about Strict and Transitional doctypes. There
Share
As far as browser behavior (and search engines etc.) goes, there is no difference between Transitional and Strict doctype, as long as you use the versions specified in the HTML 4.01 specification. They both trigger “standards mode”, to the extent a browser has one.
So the difference matters only in validation (and as documentation to people reading the markup). Markup validators play by doctypes, so when using a Strict doctype, they well flag as errors any constructs that are not allowed in the Strict version.