Converting DOCTYPE to HTML

I read a book about HTML, and there is a paragraph that I could not understand:

If you used a lot of obsolete material from the back in 2.0 and 3.2 days of HTML. Then use HTML 4.01 Transitional DOCTYPE, which allows you to validate your pages, but still allow some legacy HTML. So you don’t need to recycle all your HTML to test it.

My question is: What is the meaning of this paragraph and

What is the difference between Transitional and Strict DOCTYPE HTML?

+4
source share
4 answers

Strict is closer to the ideal of designers for HTML 4. Transitional includes additional obsolete things, which are largely replaced by CSS.

+1
source

Another thing to keep in mind, besides the internal differences in doctrines, is that HTML 4 Transitional doctype is the only modern (besides I mean HTML version 4 and above) doctype that runs quirks 1 ( This is bad!); everyone else starts the standard mode rendering.

1 See source. Also, note that this is a little trickier; the transient doctype calls quirks mode when it does not have a system identifier, and standards mode when it does. You really should use HTML 4.01 strict or, even better, HTML 5.

+1
source

In STRICT doctype, you only need to refer to the HTML standard that you define. The old rules are outdated, and therefore the check will fail if they are broken.

If you have old HTML documents and do not want to change them to comply with the new rules, you are allowed to use both new and old rules using transitional HTML in some cases.

0
source

The doctype declaration refers to a document type definition (DTD). DTD defines the rules for a markup language so that browsers render content correctly.

Go through these sites to educate yourself - http://www.w3schools.com/tags/tag_doctype.asp , http://htmlhelp.com/tools/validator/doctype.html , http://www.w3.org /QA/2002/04/valid-dtd-list.html

0
source

Source: https://habr.com/ru/post/1368929/


All Articles