answersLogoWhite

0


Best Answer

The declaration must be the very first thing in your HTML document, before the tag.

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

In HTML 4.01, the declaration refers to a DTD, because HTML 4.01 was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

Tip: Always add the declaration to your HTML documents, so that the browser knows what type of document to expect.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is this HTML code !DOCTYPE HTML?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the significance of DOCTYPE in HTML document?

An HTML DOCTYPE defines which version of the language you are using, and let's the browser act accordingly. The DOCTYPE in an HTML document is an idea borrowed from XML. The DOCTYPE file defines the rules that the language has to follow. By making sure you've declared the doctype in an HTML document, you let the browser know how you're expecting that HTML to be treated. In an ideal environment, adding a doctype will allow you to be sure of exactly how the code will be rendered by the user's browser.


What should be the first line of your HTML file?

The first line of your HTML file should start with <!DOCTYPE HTML PUBLIC.... The first line of the actual HTML code begins with the <html> tag.


What does doctype HTML public mean?

In HTML, the <!DOC TYPE> means the type of HTML coding you are using. There are many different versions of HTML. This part of the code tells the web-browser how to format the page.


What tags are used inside head?

The whole Doctype tag in html 4 is shortened in html 5. Say in html 4 you saw some code like this at the top: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Now you just use <!DOCTYPE html>


What is Doctype?

An identifier in the HTML document, that tells to the browser which type of HTML it needs to use to show contents of that document. Specifying different versions of HTML will result in different behavior of the document. If the type hasn't been specified at the beginning of HTML document the browser might load it slowly or even with the errors. Usage: <!DOCTYPE HTML /*Here goes type of the document specification (DTD)*/>

Related questions

What is the significance of DOCTYPE in HTML document?

An HTML DOCTYPE defines which version of the language you are using, and let's the browser act accordingly. The DOCTYPE in an HTML document is an idea borrowed from XML. The DOCTYPE file defines the rules that the language has to follow. By making sure you've declared the doctype in an HTML document, you let the browser know how you're expecting that HTML to be treated. In an ideal environment, adding a doctype will allow you to be sure of exactly how the code will be rendered by the user's browser.


What should be the first line of your HTML file?

The first line of your HTML file should start with <!DOCTYPE HTML PUBLIC.... The first line of the actual HTML code begins with the <html> tag.


What does doctype HTML public mean?

In HTML, the <!DOC TYPE> means the type of HTML coding you are using. There are many different versions of HTML. This part of the code tells the web-browser how to format the page.


How do you find the HTML version using code?

Your best bet is going to be looking for a "doctype declaration." For instance <!DOCTYPE html> will precede all HTML 5 pages. The same works for XHTML. The trouble becomes that HTML 4.01, and earlier, will not allow for this. Then you'll be forced to look at the code's tags, specifically, and attempt to work backwards from there. Good luck, by the way. The modern browsers automatically enter a mode of rendering called "quirks mode" whenever a doctype is not declared, or when one is declared, but its standards are not adhered to.


What is doctype HTML public w3cdtd HTML 401 transitionalen httpwwww3orgtrHTML4loosedtd?

That's the DocType for HTML 4.01. It is normally used at the very beginning of an HTML 4.01 document to tell the browser what version of HTML it should use to render the page.


What tags are used inside head?

The whole Doctype tag in html 4 is shortened in html 5. Say in html 4 you saw some code like this at the top: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Now you just use <!DOCTYPE html>


What is Doctype?

An identifier in the HTML document, that tells to the browser which type of HTML it needs to use to show contents of that document. Specifying different versions of HTML will result in different behavior of the document. If the type hasn't been specified at the beginning of HTML document the browser might load it slowly or even with the errors. Usage: <!DOCTYPE HTML /*Here goes type of the document specification (DTD)*/>


What are the five steps involved in migrating from HTML to HTML5?

There is not much in migrating from HTML to HTML5. You have to include the DOCTYPE in the html tag.


How the doctype for HTML5 looks like?

<tag>...</tag> For tags that open and close. Or <selfclosingtag> for tags that don't. Or <selfclosingtag /> if you're using XHTML **Note: neither of those are real HTML tags. For the first the paragraph tag <p>The content of the paragraph.</p> is a good example. For the second, <img src="image.jpg" alt="Image"> or <img src="image.jpg" alt="Image" />


What does DOCTYPE mean?

The term DOCTYPE tells the browser which type of HTML is used on a webpage. In turn, the browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE or using the wrong DOCTYPE may load your page in Quirks Mode. AchieversIT Training Institute.


Which elements are mandatory in an XHTML document?

doctype, html,head, body, and title


What is document tag in HTML?

HTML does not have a DOCUMENT tag. The closest thing it has is DOCTYPE, which specifies which specification of HTML (there are several versions) is being used for that page.