{"id":2346,"date":"2015-06-18T13:50:14","date_gmt":"2015-06-18T20:50:14","guid":{"rendered":"http:\/\/www.curlybrace.com\/words\/?p=2346"},"modified":"2015-06-18T13:50:14","modified_gmt":"2015-06-18T20:50:14","slug":"closing-one-off-tags-in-html5","status":"publish","type":"post","link":"https:\/\/www.curlybrace.com\/words\/2015\/06\/closing-one-off-tags-in-html5\/","title":{"rendered":"Closing One-Off Tags in HTML5?"},"content":{"rendered":"<p>I wasn&#8217;t sure whether I needed to close my <tt>meta<\/tt> tags in HTML5.  And <tt>br<\/tt> tags, for that matter.  People call them one-off tags, unpaired tags, self-closing, monotags, bachelor tags, among others.<\/p>\n<p><strong>They&#8217;re called void elements.<\/strong><\/p>\n<p>According to <a href=\"http:\/\/www.w3.org\/TR\/html5\/syntax.html#void-elements\">W3C<\/a>, the void elements are:  area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr.<\/p>\n<p>Under &#8220;8.1.2 Elements&#8221;:<\/p>\n<blockquote>\n<p>Void elements can&#8217;t have any contents (since there&#8217;s no end tag, no content can be put between the start tag and the end tag).<\/p>\n<\/blockquote>\n<p>Under &#8220;8.1.2.1 Start tags&#8221; it says:<\/p>\n<blockquote>\n<p>Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single &#8220;\/&#8221; (U+002F) character. This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.<\/p>\n<\/blockquote>\n<p><strong>So, &#8220;\/>&#8221; has no effect on a meta tag.  Or any other void element.  But it is not invalid to put it there.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wasn&#8217;t sure whether I needed to close my meta tags in HTML5. And br tags, for that matter. People call them one-off tags, unpaired tags, self-closing, monotags, bachelor tags, among others. They&#8217;re called void elements. According to W3C, the &hellip; <a href=\"https:\/\/www.curlybrace.com\/words\/2015\/06\/closing-one-off-tags-in-html5\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-2346","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/comments?post=2346"}],"version-history":[{"count":1,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2346\/revisions"}],"predecessor-version":[{"id":2347,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/posts\/2346\/revisions\/2347"}],"wp:attachment":[{"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/media?parent=2346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/categories?post=2346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.curlybrace.com\/words\/wp-json\/wp\/v2\/tags?post=2346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}