Reputation: 11
we have a website created in HTML transitional and that is placed in its DOCTYPE in the head of all documents. will something break if we just type DOCTYPE HTML instead of the long line for transitional?
Upvotes: 0
Views: 72
Reputation: 201568
This depends on the exact DOCTYPE string that you have. If it conforms to HTML 4.01 specs and thus includes a URL, then probably browsers process it in “standards mode” or “almost standards mode”, see Activating Browser Modes with Doctype. This normally implies no change or limited changes (due to the small differences between “almost standards mode” or “standards mode” – <!DOCTYPE HTML>
triggers the latter).
If, on the other hand, you have been using an HTML 4.01 Transitional DOCTYPE without a URL, then you pages are shown in “quirks mode” by important browsers. This may mean different things, ranging from no effect to total destruction, see What happens in Quirks Mode in web browsers?
Moreover, if you use a validator, there is a large number of implications: validation by HTML5 is essentially different to SGML based validation. However, validators have user interfaces that let you override the DOCTYPE and specify the version of HTML to be used in checking.
Upvotes: 1
Reputation: 349
By doing that you are actually telling browsers that "This page is in HTML 5!". however it won't affect your html unless it has deprecated tags like <font>
, <menu>
, <u>
or deprecated attributes like vspace
(in <body>
) full list can be found here , because it is backwards compatible as stated here.
Note that some browsers contune to support deprecated tags and attributes but it is good to use CSS Properties or similar tags to do the job.
Upvotes: 0