{"id":22,"date":"2018-01-03T07:00:09","date_gmt":"2018-01-03T14:00:09","guid":{"rendered":"https:\/\/coreassistance.com\/tips\/?p=22"},"modified":"2018-01-12T13:29:34","modified_gmt":"2018-01-12T20:29:34","slug":"your-html-element-needs-a-language-attribute","status":"publish","type":"post","link":"https:\/\/coreassistance.com\/tips\/2018\/01\/03\/your-html-element-needs-a-language-attribute\/","title":{"rendered":"Your HTML Element Needs a Language Attribute"},"content":{"rendered":"<p>Make sure you always specify a language in your <code>&lt;html&gt;<\/code> element, like this:<\/p>\n<pre><code class=\"html\">&lt;html lang=\"en\"&gt;<\/code><\/pre>\n<p>Why is this important?  Here are two reasons:<\/p>\n<ol>\n<li>The language attribute helps facilitate automatic translation of your content into other languages.<\/li>\n<li>Screen readers use the language attribute to make sure they&#8217;re using the proper language when reading your content.<\/li>\n<\/ol>\n<p>Both of these give more people easier access to your content, and all you have to do is add a single attribute!<\/p>\n<p>Wondering what the code for your language might be?  They&#8217;re all in <a href=\"http:\/\/www.iana.org\/assignments\/language-subtag-registry\/language-subtag-registry\">the IANA Language Subtag Registry<\/a>.  Just search that page for the name of the language you want and use the associated <code>subtag<\/code> value in your HTML element&#8217;s <code>lang<\/code> attribute.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding a single attribute helps with both automatic translation and accessibility.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-ux"],"_links":{"self":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":7,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/22\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}