Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now