Question

I work with tinymce 3.x plugin and found that this plugin creates iframe with simple doctype (see in title of question) in head of this iframe.

What means just simple doctype (see in title of question) in head of html page?

Was it helpful?

Solution

<!DOCTYPE html> is the explicit Document Type Declaration

From the linked page:

 The DOCTYPE Declaration (DTD or Document Type Declaration) does a couple of things:

     1. When performing HTML validation testing on a web page it tells the HTML (HyperText Markup Language) validator which version of (X)HTML
standard the web page coding is supposed to comply with. When you
validate your web page the HTML validator checks the coding against
the applicable standard then reports which portions of the coding do
not pass HTML validation (are not compliant).

     2. It tells the browser how to render the page in standards compliant
mode.

#2 is a very important reason for using it.

<!DOCTYPE html> , specifically, is the correct declaration for HTML5, and should be used pretty much from here to the near future. You can still use legacy strings or obsolete permitted strings, but the previously written format is all that is required in HTML5. On a further note, this DTD will cause all modern browsers dead link to switch to their standards (compliance) mode, even if they don't support HTML5.

Here's some more info:

Activating Browser Modes with Doctype

World Wide Web Consortium (they make web standards)

OTHER TIPS

It means that the document is following HTML5 standards.

You can start here: http://www.w3schools.com/tags/tag_DOCTYPE.asp

For your other question, this is how it looks:

<!DOCTYPE>
<html>

// insert code here

</html>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top