Solved

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

Posted on 2011-09-07
3
197 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
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 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