Onkar SharmaRank #104 · 20.6K reputationPosted Oct 29, 2019, 3:55 AM EDT
+1
Firstly, declaration is not an HTML tag, it is just an instruction to the web browser about the version of HTML in which a web page is written and it is not case-sensitive.
Always add the declaration in your HTML coding, so that the browser knows what type of document to expect.
The simplest and most reliable DOCTYPE Declaration in HTML5 is
Different types of Declarations are
In HTML5:
In HTML 4.01 Strict:
"http://www.w3.org/TR/html4/strict.dtd">
In HTML 4.01 Transitional:
"http://www.w3.org/TR/html4/loose.dtd">
In HTML 4.01 Frameset:
+1
Sonu GuptaRank #1,261 · 1.4K reputationPosted Oct 23, 2019, 10:12 AM EDT
0
Hi,
Go to following link-
https://www.w3schools.com/tags/tag_doctype.asp
Doctype is not an element. It gives instruction to the browser about web page's markup language's version.
A DOCTYPE declaration appears at the top of the web page before starting all elements. Doctype is the first thing defined in an HTML document even before the opening html tag.
Unlike html4 and earlier versions, There is only one declaration of doctype in HTML5 which is:
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Oct 23, 2019, 7:43 AM EDT
Onkar SharmaRank #104 · 20.6K reputationPosted Oct 29, 2019, 3:55 AM EDT
Sonu GuptaRank #1,261 · 1.4K reputationPosted Oct 23, 2019, 10:12 AM EDT
Salman BegRank #284 · 8.8K reputationPosted Oct 23, 2019, 6:58 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Oct 23, 2019, 7:44 PM EDT
Harsh ShahRank #1,322 · 1.3K reputationPosted Oct 29, 2019, 8:43 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts