Solved

What's the purpose of DOCTYPE? What would happen without it?

Posted on 2011-09-07
3
198 Views
Last Modified: 2012-05-12
Hello,

Like to know the purpose of header DOCTYPE?

It can certainly work without it, but what affect does it have and why is it important? Is it anything to do with SEO?
0
Comment
Question by:Gerson008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 125 total points
ID: 36501012
The doctype declaration should be the very first thing in an HTML document, before the <html> tag.

The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.

The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

For more details:

http://www.htmlcodetutorial.com/document/_33nDOCTYPE.html
http://www.w3schools.com/tags/tag_doctype.asp
0
 
LVL 29

Expert Comment

by:QPR
ID: 36501320
In html 5 this will/is simply <!DOCTYPE HTML>
Now we just need to wait for the browsers to catch up
0
 

Author Closing Comment

by:Gerson008
ID: 36501907
It's good, answered the question!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question