<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML5 Doctor &#187; strong</title>
	<atom:link href="http://html5doctor.com/tag/strong/feed/" rel="self" type="application/rss+xml" />
	<link>http://html5doctor.com</link>
	<description>helping you implement HTML5 today</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:28:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>The i, b, em, &amp; strong elements</title>
		<link>http://html5doctor.com/i-b-em-strong-element/</link>
		<comments>http://html5doctor.com/i-b-em-strong-element/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:40:01 +0000</pubDate>
		<dc:creator>Oli Studholme</dc:creator>
				<category><![CDATA[Elements]]></category>
		<category><![CDATA[b]]></category>
		<category><![CDATA[em]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[i]]></category>
		<category><![CDATA[strong]]></category>

		<guid isPermaLink="false">http://html5doctor.com/?p=1443</guid>
		<description><![CDATA[<p>While many HTML4 elements have been brought into HTML5 essentially unchanged, several historically presentational ones have been given semantic meanings. Let’s look at <code>&#60;i&#62;</code> and <code>&#60;b&#62;</code> and compare them to the semantic stalwarts <code>&#60;em&#62;</code> and <code>&#60;strong&#62;</code>.</p>]]></description>
			<content:encoded><![CDATA[
<p>While many HTML4 elements have been brought into HTML5 essentially unchanged, several historically presentational ones have been given semantic meanings.</p>

<span id="more-1443"></span>

<p>Let’s look at <code>&lt;i&gt;</code> and <code>&lt;b&gt;</code> and compare them to the semantic stalwarts <code>&lt;em&gt;</code> and <code>&lt;strong&gt;</code>. In summary:</p>

<ul class="toc-list">
<li><strong><code>&lt;i&gt;</code></strong> — was italic, now for <em>text in an “alternate voice”</em>, such as <ins datetime="2012-01-30T23:56:26+09:00">transliterated</ins> foreign words, technical terms, and typographically italicized text (<a href="http://dev.w3.org/html5/markup/i.html" title="HTML5: i &#8211; offset text typically styled in italic">W3C:Markup</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-i-element" title="4.6 Text-level semantics — HTML5 (including next generation additions still in development)">WHATWG</a>)</li>
<li><strong><code>&lt;b&gt;</code></strong> — was bold, now for <em>“stylistically offset” text</em>, such as keywords and typographically emboldened text (<a href="http://dev.w3.org/html5/markup/b.html" title="HTML5: b &#8211; offset text typically styled in bold (CHANGED)">W3C:Markup</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-b-element" title="4.6 Text-level semantics — HTML5 (including next generation additions still in development)">WHATWG</a>)</li>
<li><strong><code>&lt;em&gt;</code></strong> — was emphasis, now for <em>stress emphasis</em>, i.e., something you’d pronounce differently (<a href="http://dev.w3.org/html5/markup/em.html" title="HTML5: em &#8211; emphatic stress (CHANGED)">W3C:Markup</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-em-element" title="4.6 Text-level semantics — HTML5 (including next generation additions still in development)">WHATWG</a>)</li>
<li><strong><code>&lt;strong&gt;</code></strong> — was for stronger emphasis, now for <em>strong importance</em>, basically the same thing (stronger emphasis or importance is now indicated by nesting) (<a href="http://dev.w3.org/html5/markup/strong.html" title="HTML5: strong &#8211; strong importance (CHANGED)">W3C:Markup</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-strong-element" title="4.6 Text-level semantics — HTML5 (including next generation additions still in development)">WHATWG</a>)</li>
</ul>

<section>
<h2>Giving presentational elements new semantic meanings</h2>

<p><code>&lt;i&gt;</code> and <code>&lt;b&gt;</code> were <a href="http://www.w3.org/TR/html401/present/graphics.html#h-15.2.1" title="Alignment, font styles, and horizontal rules in HTML documents">HTML4 font style elements</a> and are still used presentationally where appropriate to follow typographic conventions. They now have semantic meaning, however, and their style can be changed via CSS, meaning they’re not <em>only</em> presentational — <code>&lt;b&gt;</code>, for example, doesn’t have to be bold. Because of this, <strong>it’s recommended to use classes to indicate meaning</strong> to make it easy to change the style later.</p>

<section id="element-i">
<h3>The <code>&lt;i&gt;</code> element</h3>

<blockquote class="changed-block" datetime="2012-01-30T23:56:05+09:00">
<p>The i element represents 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, a thought, or a ship name in Western texts.</p>
<footer><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-i-element" title="4.6 Text-level semantics — HTML Standard">HTML — Living Standard</a></cite>, <dfn><abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr></dfn></footer>
</blockquote>

<p>Other things that are typically italicised include <ins datetime="2012-01-30T23:53:18+09:00">transliterated</ins> foreign words (using the attribute <code>lang=""</code>), inline stage directions in a script, some musical notation, and when representing hand-written text inline:</p>

<figure id="deckard"><blockquote cite="http://www.trussel.com/bladerun.htm">
<ol class="script semantic-list">
<li><b class="character">Deckard</b>: Move! Get out of the way!</li>
<li class="action">Deckard fires. Kills Zhora in dramatic slow motion scene.</li>
<li><b class="character">Deckard</b>: <i class="voiceover">The report would be routine retirement of a replicant which didn&#8217;t make me feel any better about shooting a woman in the back. There it was again. Feeling, in myself. For her, for Rachael.</i></li>
<li><b class="character">Deckard</b>: Deckard. B-263-54.</li>
</ol></blockquote>
<figcaption>Using <code>&lt;i class="voiceover"&gt;</code> to indicate a voiceover (alternate mood)</figcaption></figure>

<figure id="japanese">
<blockquote>
<p>We ate <i lang="ja-latn" title="eel">unagi</i>, <i lang="ja-latn" title="seared salmon">aburi-zake</i>, and <i lang="ja-latn" title="octopus">tako</i> sushi last night, but the <i lang="ja-latn" title="fatty bluefin tuna belly—LET’S EAT IT ALL!">toro</i> sushi was all fished out.</p>
</blockquote>
<figcaption><ins datetime="2012-01-31T00:05:06+09:00">Using <code>&lt;i lang="ja-latn"&gt;</code> to indicate a transliterated word from a foreign language (with <code>lang="ja-latn"</code> indicating transliterated Japanese).</ins> To check character sets for <code>lang=""</code> values you can use the <a href="http://www.iana.org/assignments/character-sets" title="IANA, monospace-ing like it’s 1989">IANA’s official list of character sets</a> (ouch), or the excellent <a href="http://rishida.net/utils/subtags/" title="ishida &gt;&gt; utilities: Language subtag registry search">Language Subtag Lookup tool by Richard Ishida, W3C</a>.</figcaption>
</figure>

<figure id="nanotyrannus">
<blockquote cite="http://en.wikipedia.org/wiki/Nanotyrannus">
<p><i class="taxonomy">Nanotyrannus</i> (&#8220;dwarf tyrant&#8221;) is a genus of tyrannosaurid dinosaur, and is possibly a juvenile specimen of <i class="taxonomy">Tyrannosaurus</i>. It is based on CMN 7541, a skull collected in 1942 and described by Charles W. Gilmore described in 1946, who gave it the new species <i class="taxonomy">Gorgosaurus lancensis</i>.</p>
</blockquote>
<figcaption>Using <code>&lt;i class="taxonomy"&gt;</code> for taxonomic names</figcaption>
</figure>

<p>Only use <code>&lt;i&gt;</code> when nothing more suitable is available — e.g., <code>&lt;em&gt;</code> for text with stress emphasis, <code>&lt;strong&gt;</code> for text with semantic importance, <code>&lt;cite&gt;</code> for titles in a citation or bibliography, <code>&lt;dfn&gt;</code> for the defining instance of a word, and <code>&lt;var&gt;</code> for mathematical variables. Use CSS instead for italicizing blocks of text, such as asides, verse, and (as used here for W3C specification quote) block quotations. Remember to use the <code>class</code> attribute to identify why the element is being used, making it easy to restyle a particular use. You can target <code>lang</code> in CSS using the attribute selector (eg <code>[lang="ja-latn"]</code>). <ins datetime="2012-01-31T00:06:14+09:00">Full sentences of foreign prose should generally be set in quotes in their own paragraph (or blockquote), and should <em>not</em> use <code>&lt;i&gt;</code> (add the <code>lang</code> attribute to the containing element).</ins></p>
</section>

<section id="element-b">
<h3>The <code>&lt;b&gt;</code> element</h3>

<blockquote>
<p>The b element represents 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>
<footer><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-b-element" title="4.6 Text-level semantics — HTML Standard">HTML — Living Standard</a></cite>, <abbr>WHATWG</abbr></footer>
</blockquote>

<p>For <code>&lt;b&gt;</code> text that should merely look different, there is no requirement to use <code>font-style: bold;</code> — other styling could include a round-cornered background, larger font size, different color, or formatting such as small caps. For instance, <a href="#deckard">in the script example above</a>, <code>&lt;b class="character"&gt;</code> is used to indicate who’s speaking or narrating.</p>

<p>Text that is bold by typographic convention (and <strong>not</strong> because it’s more important) could include names in a Hollywood gossip column or the initial text on a complex or traditionally designed page:</p>

<figure>
<a href="http://oli.jp/example/speckled-band/"><img src="http://html5doctor.com/wp-content/uploads/2010/02/opening-phrase.png" alt="Opening versal (drop cap), plus styling of first phrase using b" title="Opening phrase" width="528" height="84" class="alignnone size-full wp-image-1464" /></a>
<figcaption>Connecting the versal (drop cap) with the text using <code>&lt;b class="opening-phrase"&gt;</code>. The pseudo-element selector <code>:first-letter</code> is used to create the versal. In this case, the opening phrase is bold only for stylistic reasons, but if it was semantically important, <code>&lt;strong&gt;</code> or some other element would be more appropriate. <del datetime="2010-03-10T23:51:21+09:00">Note that <code>:first-letter</code> only applies to block-level elements, so the versal “I” is not inside <code>&lt;b&gt;</code>.</del></figcaption>
</figure>

<figure>
<a href="http://oli.jp/example/speckled-band/"><img src="http://html5doctor.com/wp-content/uploads/2010/02/opening-line.png" alt="Using :first-line instead of the b element" title="Opening line" width="528" height="156" class="alignnone size-full wp-image-1463" /></a>
<figcaption>While we can use <code>&lt;b&gt;</code> to apply a traditional typographic style like small-caps to the first word, phrase or sentence, the CSS pseudo-element selector <code>:first-line</code> is more appropriate in this case. For the first paragraph of <a href="http://html5doctor.com/" title="HTML5 Doctor, helping you implement HTML5 today">HTML5Doctor.com</a> articles we use the nifty <code>:first-of-type</code> CSS3 pseudo-class selector.</figcaption>
</figure>

<p>Only use <code>&lt;b&gt;</code> when there are no other more suitable elements — e.g., <code>&lt;strong&gt;</code> for text with semantic importance, <code>&lt;em&gt;</code> for emphasized text (text with “stress emphasis”), <code>&lt;h1&gt;</code>–<code>&lt;h6&gt;</code> for titles, and <code>&lt;mark&gt;</code> for highlighted or marked text. Use classes on list items for a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#tag-clouds" title="4.12 Links — HTML5 (including next generation additions still in development)">tag cloud</a>. To recreate traditional typographic effects, use <a href="http://www.w3.org/TR/CSS2/selector.html#pseudo-element-selectors" title="Selectors">CSS pseudo-element selectors</a> like <code>:first-line</code> and <code>:first-letter</code> where appropriate. Again, remember to use the <code>class</code> attribute to identify why the element is being used, making it easy to restyle a particular use.</p>

</section>
</section>

<section>
<h2>…and for comparison, the <code>&lt;em&gt;</code> and <code>&lt;strong&gt;</code> elements</h2>

<p class="callout highlight-block">While <code>&lt;em&gt;</code> and <code>&lt;strong&gt;</code> have remained pretty much the same, there has been a slight realignment in their meanings. In HTML4 they meant ‘emphasis’ and ‘strong emphasis’. Now their meanings have been differentiated into <code>&lt;em&gt;</code> representing <em>stress emphasis</em> (i.e., something you’d pronounce differently), and <code>&lt;strong&gt;</code> representing <em>importance</em>.</p>

<section>
<h3 id="element-em">The <code>&lt;em&gt;</code> element</h3>
<blockquote>
<p>The em element represents stress emphasis of its contents.</p>
<footer><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-em-element" title="4.6 Text-level semantics — HTML Standard">HTML — Living Standard</a></cite>, <abbr>WHATWG</abbr></footer>
</blockquote>

<p>The ‘stress’ being referred to is linguistic. If spoken, this stress would be emphasised pronunciation on a word that can change the nuance of a sentence. For example, “Call a <em>doctor</em> now!” emphasises the importance of calling a doctor, perhaps in reply to someone asking “Should I get a nurse?” In contrast, “Call a doctor <em>now</em>!” emphasises the importance of calling immediately.</p>

<p>Use <code>&lt;strong&gt;</code> instead to indicate importance and <code>&lt;i&gt;</code> when you want italics without implying emphasis. The level of nesting represents the level of emphasis.</p>
</section>

<section id="element-strong">
<h3>The <code>&lt;strong&gt;</code> element</h3>
<blockquote>
<p>The strong element represents strong importance for its contents.</p>
<footer><cite><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-strong-element" title="4.6 Text-level semantics — HTML Standard">HTML — Living Standard</a></cite>, <abbr>WHATWG</abbr></footer>
</blockquote>

<p>Not much more to say really — it’s the <code>&lt;strong&gt;</code> we all know so well. Indicate relative importance by nesting <code>&lt;strong&gt;</code> elements, and use <code>&lt;em&gt;</code> for text with stress emphasis, or <code>&lt;b&gt;</code> for text that is “stylistically offset” or bold without being more important.</p>
</section>
</section>

<section>
<h2>In summation…</h2>
<p>A final thing to note: these elements (and almost all HTML5 elements) have also been made explicitly <em>media-independent</em>, meaning their semantics are not tied to how they look in a visual browser.</p>

<p>So there you have it — two stray dogs of presentational HTML4 have been transformed into meaningful HTML5 elements, ready to be adopted into your coding once again. Can <em>you</em> resist their semantically shiny puppy-dog eyes? Let us know!</p>

</section>


<section id="changes">
<h2>Changes <a class="permalink" href="#changes">#</a></h2>

<ol class="semantic-list">
<li><time datetime="2012-01-31T00:09:51+09:00">2012-01-31</time> I’ve updated mentions of using <code>&lt;i&gt;</code> for foreign words to be specifically <em>transliterated</em> foreign words (what I was meaning), based on feedback in the comments. I’ve also updated spec quotes.</li>
</ol>

<!-- /#changes --></section>
<div id="crp_related"><h3>Related Posts:</h3><ul class="related"><li><a href="http://html5doctor.com/small-hr-element/" rel="bookmark" class="crp_title">The small &amp; hr elements</a></li><li><a href="http://html5doctor.com/u-element/" rel="bookmark" class="crp_title">The return of the u element</a></li><li><a href="http://html5doctor.com/ruby-rt-rp-element/" rel="bookmark" class="crp_title">The ruby element and her hawt friends, rt and rp</a></li><li><a href="http://html5doctor.com/draw-attention-with-mark/" rel="bookmark" class="crp_title">Draw attention with mark</a></li><li><a href="http://html5doctor.com/blockquote-q-cite/" rel="bookmark" class="crp_title">Quoting and citing with <code>&lt;blockquote&gt;</code>, <code>&lt;q&gt;</code>, <code>&lt;cite&gt;</code>, and the cite attribute</a></li></ul></div><p><a href="http://html5doctor.com/i-b-em-strong-element/" rel="bookmark">The i, b, em, &amp; strong elements</a> originally appeared on <a href="http://html5doctor.com">HTML5 Doctor</a> on March 9, 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://html5doctor.com/i-b-em-strong-element/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
	</channel>
</rss>

