Just to be able to validate until you can get rid of all the presentational markup. A Strict doctype is what you should use for all new documents. Most other presentational markup has been thrown out, though. Transitional doctypes trigger Almost Standards Mode at best. Please consider upgrading your web browser. It's the component of an SGML document of which an HTML document is supposed to be an instance in this case that contains the formal definition of the markup grammar valid element type names, which elements contain which, valid attribute names, etc.
An SGML parser has to process these definitions before it can check the instance markup. You'll here a whole bunch of mythology to the effect that this name is about the HTML spec itself, or about how HTML semantics are announced, but all of that is bogus.
This HTML 4. W3C will gradually phase out these attributes and tags. You can use style sheets to achieve this. You should use Strict DTD. If you need support for presentation layer attributes and tags, please use Transitional DTD. I stated earlier that the doctype needs to be the very first thing in your HTML documents. Well, that is in fact a slightly simplified version of the truth.
There is also the XML declaration to consider. This is called an XML Declaration, and when it is present it needs to be inserted before the doctype. Internet Explorer version 6 has a problem with that—this causes it to switch into Quirks mode, and as I explained earlier you most likely do not want that.
The probability of all that happening all at once is quite slim, so the easiest way to solve the Internet Explorer problem is to simply omit the XML declaration. Always include one of the doctypes mentioned here as the very first thing in all of your HTML documents.
It will make sure that validators know what version of HTML you are using, so they can correctly report any mistakes you have made.
0コメント