Should i use strict or transitional doctype




















If we suppose will not use the html tag elements in the inside of the document that should be with the DOCTYPE declaration, it must be must with the html standards with the help of web browsers, and templates will check the html standards. You may also have a look at the following articles to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy.

Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy.

The most important parts of the doctype are the two strings delimited by quotes. Some web browsers even contain such functionality by default, while others can have it added by installing an extension.

Most web browsers released in the 21st century look at the doctype of any HTML documents they encounter and use that to decide whether the author of the documents took care to write their HTML and CSS properly according to web standards.

In standards mode, browsers generally try to render the page according to the CSS specifications—they trust that the person who created the document knew what they were doing.

As a web designer or developer, you will get the most consistent results by making sure that all browsers use their Standards rendering mode, hence you should stick to web standards, and use a proper doctype! As I mentioned earlier, the doctype is also used by validators, which you will learn more about later in this article series. For now, all you need to know is that a validator is used to check that the syntax of your HTML document is correct and does not contain any mistakes.

The validator programs look at the doctype you have used to determine what rules to use. So, now that you know that you need to insert a doctype and what it is used for, how will you know which one to choose?

You could even create your own if you feel up to something more advanced. Note: "Real" XHTML should be delivered to the web browser as XML, but the details of how and when to do that, and the implications it has, is beyond the scope of this particular article.

Lets say that your current page is HTML Tag soup, it resembles a geocities site from , font tags, center tags, marquees etc. You decide that you want to sort out your HTML and get it looking something like. So your site is in a transition from tag soup to HTML 4. Which is of course the right way to do things. As blain said, a Transitional doctype is meant to be used in a transitional gasp! Just to be able to validate until you can get rid of all the presentational markup.



0コメント

  • 1000 / 1000