{"id":20091,"date":"2022-10-06T03:52:47","date_gmt":"2022-10-06T03:52:47","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9259"},"modified":"2022-10-06T03:52:47","modified_gmt":"2022-10-06T03:52:47","slug":"html-declaration","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-declaration\/","title":{"rendered":"HTML <!DOCTYPE> Declaration"},"content":{"rendered":"\n<p>The &lt;!DOCTYPE> declaration is the first line of the code in HTML or XHTML document. It specifies the HTML version used in the document. Each HTML document should start with this declaration: so the browsers will render the page compliant with HTML standards. In HTML 4.01, this declaration refers to a\u00a0Document Type Definition (DTD), which specifies the structure and the legal elements of an XML document.<\/p>\n\n\n\n<p>The &lt;!DOCTYPE> is declared before the\u00a0&lt;html>\u00a0tag. The declaration is not case sensitive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax-2\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Root element] &#91;Publicity] \"&#91;Registration]\/\/&#91;Organization]\/\/&#91;Type] &#91;Name]\/\/&#91;Language]\" \"&#91;URL]\"&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lt-doctype-gt-parameters-4\">&lt;!DOCTYPE&gt; Parameters<\/h2>\n\n\n\n<p><strong>Root element<\/strong>&nbsp;\u2014 a parent element that contains all the other elements. For HTML it is the &lt;html&gt; tag.<\/p>\n\n\n\n<p><strong>Publicity<\/strong>&nbsp;\u2014 the document can be PUBLIC or SYSTEM (local files, for example). For HTML\/XHTML the value is PUBLIC.<\/p>\n\n\n\n<p><strong>Registration<\/strong>&nbsp;&#8211; can have two values: plus (+) &#8211; the developer is registered in ISO (International Organization for Standardization) and &#8211; (minus) &#8211; the developer is not registered. For W3C, the value is set to &#8220;-&#8220;.<\/p>\n\n\n\n<p><strong>Organization<\/strong>&nbsp;\u2014 the name of DTD developer. The developer of HTML\/XHTML is W3C, and its name is declared in &lt;!DOCTYPE&gt;.<\/p>\n\n\n\n<p><strong>Type<\/strong>&nbsp;\u2014 the type of the document. For HTML\/XHTML the value is DTD.<\/p>\n\n\n\n<p><strong>Name<\/strong>&nbsp;\u2014 unique identifier describing DTD.<\/p>\n\n\n\n<p><strong>Language<\/strong>&nbsp;\u2014 the language of the document (two letters in uppercase). For HTML\/XHTML the language is English (EN).<\/p>\n\n\n\n<p><strong>URL<\/strong>\u00a0\u2014 the URL of the document type description (e.g.\u00a0https:\/\/www.w3.org\/TR\/html4\/loose.dtd).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-the-lt-doctype-gt-declaration-for-html-6\">Types of the &lt;!DOCTYPE&gt; Declaration for HTML<\/h2>\n\n\n\n<p>There are three types of the &lt;!DOCTYPE&gt; declaration for HTML:<\/p>\n\n\n\n<p><strong>Strict<\/strong>&nbsp;&#8211; contains all HTML elements and attributes. However, the presentational or deprecated elements are not included.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\" \"https:\/\/www.w3.org\/TR\/html4\/strict.dtd\"&gt;<\/code><\/pre>\n\n\n\n<p><strong>Transitional<\/strong>&nbsp;&#8211; contains all HTML elements and attributes, including presentational and deprecated elements. Frames are not allowed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\" \"https:\/\/www.w3.org\/TR\/html4\/loose.dtd\"&gt;<\/code><\/pre>\n\n\n\n<p><strong>Frameset<\/strong>&nbsp;&#8211; is equal to Transitional, but allows the use of frames.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Frameset\/\/EN\" \"https:\/\/www.w3.org\/TR\/html4\/frameset.dtd\"&gt;<\/code><\/pre>\n\n\n\n<p>There is only one version of declaration for HTML 5.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-lt-doctype-gt-declaration-15\">Example of the HTML &lt;!DOCTYPE&gt; declaration:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;h2&gt;Elements example&lt;\/h2&gt;\n    &lt;p&gt;This is some paragraph.&lt;\/p&gt;\n    &lt;p&gt;This is another paragraph &lt;br\/&gt; with  line break.&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"result-17\">Result<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/mdr.foobrdigital.com\/wp-content\/uploads\/2022\/10\/image-30.png\" alt=\"\" class=\"wp-image-9260\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"types-of-the-lt-doctype-gt-declaration-for-xhtml-19\">Types of the &lt;!DOCTYPE&gt; Declaration for XHTML<\/h2>\n\n\n\n<p>Here you can find types of the &lt;!DOCTYPE&gt; declaration for XHTML.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xhtml-1-0-strict-21\">XHTML 1.0 Strict<\/h3>\n\n\n\n<p>This DTD includes all the HTML elements and attributes, except presentational or deprecated elements. This DTD doesn\u2019t allow frameworks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd\"&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xhtml-1-0-transitional-24\">XHTML 1.0 Transitional<\/h3>\n\n\n\n<p>This DTD includes all the HTML elements and attributes, as well as presentational and deprecated elements. Framesets are not allowed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xhtml-1-0-frameset-27\">XHTML 1.0 Frameset<\/h3>\n\n\n\n<p>This DTD is similar to XHTML 1.0 Transitional, but framesets are allowed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Frameset\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-frameset.dtd\"&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xhtml-1-1-30\">XHTML 1.1<\/h3>\n\n\n\n<p>This DTD is equal to XHTML 1.0 Strict, but allows adding modules (e.g., to provide Ruby support for East-Asian languages).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.1\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml11\/DTD\/xhtml11.dtd\"&gt;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Browser support<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_chrome.svg\" alt=\"chrome\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_edge.svg\" alt=\"edge\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_firefox.svg\" alt=\"firefox\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_safari.svg\" alt=\"safari\" width=\"24\" height=\"24\"><\/th><th><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.w3docs.com\/build\/images\/bw_opera.svg\" alt=\"opera\" width=\"24\" height=\"24\"><\/th><\/tr><\/thead><tbody><tr><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><td>\u2713<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The &lt;!DOCTYPE> declaration is the first line of the code in HTML or XHTML document. It specifies the HTML version used in the document. Each HTML document should start with this declaration: so the browsers will render the page compliant with HTML standards. In HTML 4.01, this declaration refers to a\u00a0Document Type Definition (DTD), which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[529],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/20091"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=20091"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/20091\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=20091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=20091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=20091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}