{"id":822,"date":"2023-02-19T16:28:17","date_gmt":"2023-02-19T16:28:17","guid":{"rendered":"https:\/\/html5accessibility.com\/stuff\/?p=822"},"modified":"2023-02-20T21:40:16","modified_gmt":"2023-02-20T21:40:16","slug":"representation-of-style","status":"publish","type":"post","link":"https:\/\/html5accessibility.com\/stuff\/2023\/02\/19\/representation-of-style\/","title":{"rendered":"Representation of style"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-824 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/01\/IMG_1600.jpg\" alt=\"A selection of fashionable hair styles as modeled by the sophisticate fraternity of male accessibility experts.\" width=\"750\" height=\"508\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/01\/IMG_1600.jpg 750w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/01\/IMG_1600-300x203.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<h3><a href=\"https:\/\/html.spec.whatwg.org\/multipage\/dom.html#represents\">Represents<\/a><\/h3>\n<blockquote><p>Elements in the DOM <dfn id=\"represents\">represent<\/dfn> things; that is, they have intrinsic <em>meaning<\/em>, also known as semantics.<\/p><\/blockquote>\n<p>The HTML spec tries hard to give <code>&lt;b&gt;<\/code> &amp; <code>&lt;strong&gt;<\/code>, and <code>&lt;i&gt;<\/code> &amp; <code>&lt;em&gt;<\/code> distinct and intrinsic meaning beyond the meaning that emerges from their visible default styles (and related aural styles):<\/p>\n<h3>The <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-i-element\"><code id=\"the-i-element:the-i-element\">i<\/code><\/a> element<\/h3>\n<blockquote><p><strong>Represents<\/strong> a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.<\/p><\/blockquote>\n<h3>The <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-b-element\"><code id=\"the-b-element:the-b-element\">b<\/code><\/a> element<\/h3>\n<blockquote><p><strong>Represents<\/strong> a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede.<\/p><\/blockquote>\n<h3>The <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-em-element\"><code id=\"the-em-element:the-em-element\">em<\/code><\/a> element<\/h3>\n<blockquote><p><strong>Represents<\/strong> stress emphasis of its contents.<\/p>\n<p>The level of stress that a particular piece of content has is given by its number of ancestor <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-em-element\"><code id=\"the-em-element:the-em-element-2\">em<\/code><\/a> elements.<\/p>\n<p>The placement of stress emphasis changes the meaning of the sentence. The element thus forms an integral part of the content. The precise way in which stress is used in this way depends on the language.<\/p><\/blockquote>\n<h3>The <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-strong-element\"><code id=\"the-strong-element:the-strong-element\">strong<\/code><\/a> element<\/h3>\n<blockquote><p><strong> Represents<\/strong> strong importance, seriousness, or urgency for its contents.<\/p>\n<p><strong>Importance<\/strong>: the <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/text-level-semantics.html#the-strong-element\"><code id=\"the-strong-element:the-strong-element-2\">strong<\/code><\/a> element can be used in a heading, caption, or paragraph to distinguish the part that really matters from other parts that might be more detailed, more jovial, or merely boilerplate. (This is distinct from marking up subheadings, for which the <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/sections.html#the-hgroup-element\"><code id=\"the-strong-element:the-hgroup-element\">hgroup<\/code><\/a> element is appropriate.)<\/p><\/blockquote>\n<h2>Not helpful<\/h2>\n<p>Implementations do nothing to help make the use of these elements distinct and meaningful:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-828 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/01\/bi.png\" alt=\"b and I buttons in wordpress editor\" width=\"92\" height=\"47\" \/><\/p>\n<p>The WordPress WYSIWYG editor has a toolbar which includes the <strong>B<\/strong> and <em>I<\/em> buttons. On hover each has a tooltip &#8220;Bold (Ctrl+B)&#8221; and &#8220;Italic (Ctrl+I)&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-844 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/gbi.png\" alt=\"b and i buttons in the Github markdown editor\" width=\"91\" height=\"53\" \/><br \/>\nThis UI is common in HTML and Markdown editors, including GitHub Markdown editor.<\/p>\n<h3>Examples<\/h3>\n<p><strong>B<\/strong> <code>&lt;b&gt;<\/code> is useful for drawing attention to product names without indicating <strong>importance<\/strong>. For example:<\/p>\n<blockquote><p>This blog is powered by <strong>WordPress<\/strong><\/p><\/blockquote>\n<p><em>I<\/em> <code>&lt;i&gt;<\/code> can be used, amongst other things, to signify that a word is a ship&#8217;s name without <em>emphasizing<\/em> it. For example:<\/p>\n<blockquote><p>(Factoid) In 1968 I first traveled from Australia to the UK on a passenger ship named the <em>Ellinis<\/em>. At the time it was cheaper to travel by boat for 6 weeks, than to fly<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-836 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis.jpg\" alt=\"a watercolour rendition of the Ellinis\" width=\"1239\" height=\"546\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis.jpg 1239w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis-300x132.jpg 300w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis-1024x451.jpg 1024w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis-768x338.jpg 768w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/ellinis-1200x529.jpg 1200w\" sizes=\"auto, (max-width: 1239px) 100vw, 1239px\" \/><strong>Only 2 problems:<\/strong><\/p>\n<ol>\n<li>Marking up text with the <strong>B <\/strong>button results in it being marked as <code>&lt;strong&gt;WordPress&lt;\/strong&gt;<\/code><\/li>\n<li>Marking up text with the <em>I<\/em> button results in it being marked as <code>&lt;em&gt;Ellinis&lt;\/em&gt;<\/code><\/li>\n<\/ol>\n<h2>Large scale usage<\/h2>\n<p>Search engine results can be a good indicator of how text level semantics are used on a large scale (think millions of page views per hour). And therefore what they are perceived to represent to users.<\/p>\n<figure id=\"attachment_841\" aria-describedby=\"caption-attachment-841\" style=\"width: 673px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-841 size-full\" src=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/bolddd.png\" alt=\"https:\/\/www.thefreedictionary.com \u203a bold Bold - definition of bold by The Free Dictionary bold (bo\u028ald) adj. -er, -est. 1. not hesitating or fearful in the face of danger;\" width=\"673\" height=\"118\" srcset=\"https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/bolddd.png 673w, https:\/\/html5accessibility.com\/stuff\/wp-content\/uploads\/2023\/02\/bolddd-300x53.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><figcaption id=\"caption-attachment-841\" class=\"wp-caption-text\">Search result from duck duck go<\/figcaption><\/figure>\n<p>Let&#8217;s search for &#8220;bold The Free Dictionary&#8221; on a number of search engines and look at the results and how they use text level semantics:<\/p>\n<p><a href=\"https:\/\/duckduckgo.com\/?q=bold+The+Free+Dictionary\">DuckDuckGo<\/a>: the word &#8220;bold&#8221; is marked up like this <code>&lt;b&gt;bold&lt;\/b&gt;<\/code> with default browser style overridden.<\/p>\n<pre>strong, b {\r\nfont-weight: 600;\r\n}<\/pre>\n<p><a href=\"https:\/\/www.google.com\/search?q=bold+The+Free+Dictionary\">Google<\/a>: the word &#8220;bold&#8221; is marked up like this <code>&lt;em&gt;bold&lt;\/em&gt;<\/code> with default browser style overridden:<\/p>\n<pre>em {\r\nfont-weight: bold;\r\nfont-style: normal;\r\n}<\/pre>\n<p><a href=\"https:\/\/www.google.com\/search?q=bold+The+Free+Dictionary\">Bing<\/a>: the word &#8220;bold&#8221; is marked up like this <code>&lt;strong&gt;bold&lt;\/strong&gt;<\/code> with default browser style overridden:<\/p>\n<pre>strong {\r\ncolor: #767676;\r\nfont-weight: 700;\r\n}<\/pre>\n<p><a href=\"https:\/\/www.baidu.com\/s?ie=utf-8&amp;f=8&amp;rsv_bp=1&amp;rsv_idx=1&amp;tn=baidu&amp;wd=bold%20The%20Free%20Dictionary&amp;fenlei=256&amp;rsv_pq=0xf18590800003572f&amp;rsv_t=9085YF5GPs8OjCUc5BZkuGWcJyCmwQiLaszDUoNyjgEUXJtElQCPtS6BR%2FRL&amp;rqlang=en&amp;rsv_enter=0&amp;rsv_dl=tb&amp;rsv_sug3=1&amp;rsv_btype=i\">Baidu<\/a>: the word &#8220;bold&#8221; is marked up like this <code>&lt;em&gt;bold&lt;\/em&gt;<\/code> with default browser style overridden:<\/p>\n<pre>em {\r\ncolor: #f73131;\r\nfont-style: normal;\r\n}\r\n<\/pre>\n<h2>Meaningful Meaninglessness<\/h2>\n<p>The conclusion I draw from the specification, usage and implementation examples above is that although the HTML specification attempts to make a distinction between <code>&lt;b&gt;<\/code> &amp; <code>&lt;strong&gt;<\/code>, and <code>&lt;i&gt;<\/code> &amp; <code>&lt;em&gt;<\/code>; the general fuzz and fudge of their specification, historical and current use, UI implementations &amp; style representations,\u00a0 coalesce to make attempts to distinguish them futile:<\/p>\n<p class=\"note\"><code>&lt;b&gt;<\/code> = <code>&lt;strong&gt;<\/code> and <code>&lt;i&gt;<\/code> =<code>&lt;em&gt;<\/code>.<\/p>\n<h2>Addendum<\/h2>\n<p>A discussion on Mastodon with Charles Roper prompted me to take a quick look at how scientific names are marked up on the web:<\/p>\n<p><iframe src=\"https:\/\/indieweb.social\/@charlesroper\/109892787620216026\/embed\" allowfullscreen=\"allowfullscreen\" title=\"Mastodon toot by Charles Roper\"><\/iframe><\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"result\" data-slug-hash=\"poOjYKZ\" data-user=\"stevef\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/stevef\/pen\/poOjYKZ\"><br \/>\n  scientific plant names examples<\/a> by steve faulkner (<a href=\"https:\/\/codepen.io\/stevef\">@stevef<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<h2>Further Reading<\/h2>\n<ul>\n<li class=\"site_headline__title \"><a href=\"https:\/\/www.tpgi.com\/screen-readers-support-for-text-level-html-semantics\/\">Screen Readers support for text level HTML semantics<\/a><\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/QfeEcCLMtxk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Represents Elements in the DOM represent things; that is, they have intrinsic meaning, also known as semantics. The HTML spec tries hard to give &lt;b&gt; &amp; &lt;strong&gt;, and &lt;i&gt; &amp; &lt;em&gt; distinct and intrinsic meaning beyond the meaning that emerges from their visible default styles (and related aural styles): The i element Represents a span [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-822","post","type-post","status-publish","format-standard","hentry","category-htmlaccessibility"],"_links":{"self":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/comments?post=822"}],"version-history":[{"count":31,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/822\/revisions"}],"predecessor-version":[{"id":865,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/posts\/822\/revisions\/865"}],"wp:attachment":[{"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/media?parent=822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/categories?post=822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5accessibility.com\/stuff\/wp-json\/wp\/v2\/tags?post=822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}