{"id":310,"date":"2021-01-05T19:03:35","date_gmt":"2021-01-05T19:03:35","guid":{"rendered":"https:\/\/wshop.fi\/eng\/?p=310"},"modified":"2021-03-25T19:21:23","modified_gmt":"2021-03-25T19:21:23","slug":"doctype-reference-html-and-xhtml","status":"publish","type":"post","link":"https:\/\/wshop.fi\/eng\/doctype-reference-html-and-xhtml\/","title":{"rendered":"Doctype Reference &#8211; HTML and XHTML"},"content":{"rendered":"\n<p>Here are the doctype declarations for you. Short and sweet<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML Doctypes:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">HTML 5 Doctype<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">HTML 4.01 Strict Doctype<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\"\n\"http:\/\/www.w3.org\/TR\/html4\/strict.dtd\"><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">XHTML Doctypes:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">XHTML 1.1 Doctype<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.1\/\/EN\"\n\"http:\/\/www.w3.org\/TR\/xhtml11\/DTD\/xhtml11.dtd\"><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">XHTML 1.0 Transitional Doctype<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">XHTML 1.0 Strict Doctype<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN\"\n\"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd\"><\/code><\/pre>\n\n\n\n<p>Read more&nbsp;<a href=\"http:\/\/www.w3schools.com\/tags\/tag_doctype.asp\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>*Something to note &#8211; If you use TinyMCE it tries to produce XHTML compliant code, not HTML. &nbsp;That being said, I\u2019ve had it strip out \u201cempty\u201d tags and divs that wrapped around other divs because they were seen as empty. &nbsp;A hack to fix this is putting a comment before (and possibly after the opening tag of the \u201cempty\u201d element.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- -->\n&lt;div id=\"shortyWannaLickTheWrapper\">\n&lt;!-- -->\n    &lt;div>\n         &lt;p>Shorty&lt;\/p>\n    &lt;\/div>\n    &lt;div>\n         &lt;p>Candy of some sort&lt;\/p>\n    &lt;\/div>\n&lt;\/div><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here are the doctype declarations for you. Short and sweet HTML Doctypes: HTML 5 Doctype HTML 4.01 Strict Doctype XHTML Doctypes: XHTML 1.1 Doctype XHTML 1.0 Transitional Doctype XHTML 1.0 Strict Doctype Read more&nbsp;here. *Something to note &#8211; If you use TinyMCE it tries to produce XHTML compliant code, not HTML. &nbsp;That being said, I\u2019ve [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":178,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":{"0":"post-310","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-coding"},"_links":{"self":[{"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":1,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":311,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/posts\/310\/revisions\/311"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/media\/178"}],"wp:attachment":[{"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wshop.fi\/eng\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}