Why Doctype Is So Important?
September 9, 2010 Web Design No CommentsLet’s imagine that you would make all correctly, but your site for some reason doesn’t look or doesn’t work, predictably, in the last versions of browsers.
You have written correct standard XHTML code and standard CSS. You have used the standard specification for operation with DOM (Document Object Model) to control dynamic elements on page. And nevertheless, in browsers which it would seem are made with observance of these standards, your site doesn’t work. Most likely, the error is covered in wrong DOCTYPE title.
This small article will tell to you about titles DOCTYPE which work and also will explain practical and theoretical value of it, it would seem distracted from a reality, a tag.
What is DOCTYPE?
According to specifications HTML and XHTML tag DOCTYPE (that means “the document type declaration”) informs to validator, (X) HTML that you use some version in the page. This tag should be in the first line of each page. Tag DOCTYPE is a key component of the web pages claiming for correspondence to standards: without it your code and CSS won’t transit check.
Tag DOCTYPE also is important for the correct display and page operation in the browsers corresponding to standards (Mozilla, IE5/Mac, and IE6/Win).
Tag DOCTYPE in which attributes is underlined URL (the full web-address), informs browsers that the page needs to be deduced with observance of the certain standard or a subspecies of this standard.
If you will use incomplete tag DOCTYPE, its out-of-date type or generally will forget about it the browser will pass in “a mysterious” mode and will start with the assumption that you wrote the code of page with errors and is free receded from standards i.e. how it was written in the end of 90-s’ years.
In this mode the browser will try to disassemble your page by rules of backward compatibility and will display, for example, CSS how it would deduce Internet Explorer 4th version and DOM will work how it worked in this browser (IE switches in old DOM, and Mozilla and Netscape 6 switches generally in god knows what).
It is clear that for you this trick isn’t desirable. But you also receive it, if would use incomplete or wrong tag DOCTYPE.
(Attention: browser Opera doesn’t play by such rules; it always tries to display page how if it corresponded to standards. Glory to the Opera! On the other hand, Opera yet completely supports standard W3C DOM, but operation over is already conducted.)
In the near future
We have all reasons to hope that W3C will soon lay out the full, exact and convenient list of all variants of tag DOCTYPE on the site, and also will publish other essential information. And this information will be easy for finding.
These days the web technologies are very popular. The web network is not only a place to entertain but also a spot to make money. Whatever the reason is, to be presented in the Internet one needs a site. And this is when the question how to make a website arises. Those who are looking for details on how to build a website, should refer to the Web itself. There are lots of docs on how to make a website and respective topics.
In any way, it wouldn’t be wise not to avail themselves of this chance given to us by digital technologies. Google and other search engines, social networks and forums, blogs – all of them could assist to find information on “where to make a website” and similar topics.



