<?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>CSS Wizardry &#187; Web Standards</title>
	<atom:link href="http://csswizardry.com/tag/web-standards/feed/" rel="self" type="application/rss+xml" />
	<link>http://csswizardry.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 16 May 2012 12:57:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>More logo markup tips</title>
		<link>http://csswizardry.com/2011/08/more-logo-markup-tips/</link>
		<comments>http://csswizardry.com/2011/08/more-logo-markup-tips/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 20:31:49 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Logo]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=2988</guid>
		<description><![CDATA[In my previous article we determined that your logo is not a &#60;h1&#62; and is in fact an image (&#60;img /&#62;) in its own right. Now let&#8217;s cover some nice little tips and snippets for making the most of your markup and creating a nicer UX around it.
The techniques I&#8217;m going to cover can be [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous article we determined that <a href="http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/">your logo is not a <code>&lt;h1&gt;</code></a> and is in fact an image (<code>&lt;img /&gt;</code>) in its own right. Now let&#8217;s cover some nice little tips and snippets for making the most of your markup and creating a nicer UX around it.</p>
<p>The techniques I&#8217;m going to cover can be found on my recently launched hub site <a href="http://hry.rbrts.me">hry.rbrts.me</a>, but for the sake of clarity I have <a href="http://jsfiddle.net/csswizardry/h7zrY/">isolated them in a jsFiddle here</a>.</p>
<p>So, if we know a logo needs to be an <code>&lt;img /&gt;</code> that&#8217;s easy enough, but what if we want hover styles on this image? Simple.</p>
<p>We&#8217;ll be wrapping the logo in an <code>&lt;a&gt;</code> so as to link back to the homepage, a common and good practice:</p>
<pre><code>&lt;a href=&quot;/&quot; id=&quot;logo&quot;&gt;
  &lt;img src=&quot;/img/logo.png&quot; alt=&quot;Company logo&quot;&gt;
&lt;/a&gt;</code></pre>
<p>What we can do here is utilise this <code>&lt;a&gt;</code> and apply a sprited background image to it to provide our on/off hover states, thus:</p>
<pre><code>#logo{
  display:block;
  width:100px; /* Width of logo */
  height:100px; /* Height of logo */
  background:url(/img/css/sprite.png);
}</code></pre>
<p>So now we have a background on the <code>&lt;a&gt;</code> surrounding our <code>&lt;img /&gt;</code> that we now need to git rid of.</p>
<p>We could do this by using a simple <code>display:none;</code> or more accessibly using:</p>
<pre><code>#logo img{
  position:absolute;
  left:-9999px;
}</code></pre>
<p>Now we can no longer see the <code>&lt;img /&gt;</code> but we <em>can</em> see the background on the <code>&lt;a&gt;</code> behind it.</p>
<p>Now all we need is to move the sprite on <code>:hover</code>, thus:</p>
<pre><code>#logo:hover{
  background-position:0 -100px;
}</code></pre>
<p>So here we have a semantically sound logo, using (as we should be) an <code>&lt;img /&gt;</code> with the added benefit of being able to use sprites to give the logo hover effects.</p>
<h2>There&#8217;s more&#8230;</h2>
<p>There&#8217;s another little thing I&#8217;ve started doing which I really like. We have an image in the page semantically, but not functionally. Right clicking the logo won&#8217;t yield a <i>view image</i> context menu, instead it&#8217;ll just focus on the <code>&lt;a&gt;</code>.</p>
<p>What I like to do, which is a nice little touch, is to unhide the <code>&lt;img /&gt;</code> (i.e. get rid of the absolute positioning above) and instead just hide it with <code>opacity:0;</code> (or <code>filter:alpha(opacity = 0);</code> for IE). This means that the user can still right click the logo and be interacting with an image, but they still get your nice sprites on hover.</p>
<p>So we have an <code>&lt;a&gt;</code> with a background sprite which contains an invisible image that a user can still interact with; <a href="http://hry.rbrts.me">see it in situ</a> or look at <a href="http://jsfiddle.net/csswizardry/h7zrY/">an isolated case</a>. Try hovering and right clicking&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2011/08/more-logo-markup-tips/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Your logo is an image, not a &lt;h1&gt;</title>
		<link>http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/</link>
		<comments>http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 22:12:14 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Logo]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=1545</guid>
		<description><![CDATA[Should you mark your logo up as an image or a &#60;h1&#62;? There has been much debate for a long time now as to how to mark up logos. Should your logo be an inline image (&#60;img /&#62;) or a &#60;h1&#62; with a background style&#8212;using one of many means of image replacement&#8212;to apply the logo [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>S</span>hould</span> you mark your logo up as an image or a <code>&lt;h1&gt;</code>? There has been much debate for a long time now as to how to mark up logos. Should your logo be an inline image (<code>&lt;img /&gt;</code>) or a <code>&lt;h1&gt;</code> with a background style&mdash;using one of <a href="http://www.mezzoblue.com/tests/revised-image-replacement/">many means of image replacement</a>&mdash;to apply the logo to that? This debate has been raging for goodness knows how long, but I&#8217;m going to try and explain in this article why you should mark up logos as inline images, and why that&#8217;s the most sensible option.</p>
<p><span id="more-1545"></span></p>
<h2>A brief example of each</h2>
<p>Using an image:</p>
<pre><code>&lt;a href=&quot;/&quot; title=&quot;Return to the homepage&quot; id=&quot;logo&quot;&gt;
  &lt;img src=&quot;/images/logo.gif&quot; alt=&quot;Nike logo&quot; /&gt;
&lt;/a&gt;</code></pre>
<p>Using a <code>&lt;h1&gt;</code>:</p>
<pre><code>&lt;h1&gt;&lt;a href=&quot;/&quot; title=&quot;Return to the homepage&quot;&gt;Nike&lt;/a&gt;&lt;/h1&gt;

h1 a{
  width:;
  height:;
  display:block;
  text-indent:-9999px;
  background:url(/images/logo.gif);
}</code></pre>
<h2>Your logo is content</h2>
<p>Your logo is content, not style. Style vs. content, in the web standards sense of the term, pertains to information and content that is required to be present/accessible irrespective of the presence of styles (in other words, CSS).</p>
<p>A logo is content. Let&#8217;s use Nike as an example throughout. Regardless of whether Nike&#8217;s site is blue, red or green, their logo will always be &#8216;that&#8217; swoosh. The logo is totally independent of the site&#8217;s surrounding styles as the logo is content.</p>
<p>Imagine you were to visit Nike&#8217;s site in a browser that doesn&#8217;t support styles. It only makes sense that that logo is still there. It&#8217;s Nike&#8217;s brand, and it&#8217;ll be their brand whether their site is styled or not.</p>
<p>So your logo is content; it&#8217;s a visual representation of a brand that is defined long before that company&#8217;s site can be brought into consideration. Nike is admittedly a very big brand, but a brand nonetheless. Transport that way of thinking to any build and it&#8217;s becomes pretty obvious that a logo is indeed content.</p>
<h3>Content = markup</h3>
<p>So if a logo is content, a logo is markup, right? Right. You&#8217;d probably want to mark up your logo as follows:</p>
<pre><code>&lt;a href=&quot;/&quot; title=&quot;Return to the homepage&quot; id=&quot;logo&quot;&gt;
  &lt;img src=&quot;/images/logo.gif&quot; alt=&quot;Nike logo&quot; /&gt;
&lt;/a&gt;</code></pre>
<p>As simple as that. Regardless of styles your content&mdash;and therefore logo&mdash;persist. Use the <code>id=&quot;logo&quot;</code> to style anything such as positioning, and that&#8217;s it.</p>
<h2>Your logo isn&#8217;t a <code>&lt;h1&gt;</code></h2>
<p>So we&#8217;ve proved that a logo is content, but let&#8217;s now prove that it <em>isn&#8217;t</em> a <code>&lt;h1&gt;</code>, a commonly held practice for marking up logos.</p>
<blockquote><p>&#8220;To have the &lt;h1&gt; being the logo would be like having your name being a photo. They both represent the same thing, but are separate entities&#8230;&#8221;</p>
</blockquote>
<p>The <code>&lt;h1&gt;</code> element is defined as being the uppermost, all-encompassing title of a page. Now, for a homepage this is something of a grey area. The chances are that your site is the site which the logo represents, i.e. Nike&#8217;s logo appearing on Nike&#8217;s site. On the homepage the <code>&lt;h1&gt;</code> may well be whatever the logo says; it may well be <code>&lt;h1&gt;Nike&lt;/h1&gt;</code>. This is a case where the logo and the <code>&lt;h1&gt;</code> share the same meaning. <em>But</em>, as discussed, the content of the two is different. The logo is still branding, and the <code>&lt;h1&gt;</code> is still a textual element. To have the <code>&lt;h1&gt;</code> being the logo would be like having your name being a photo. They both represent the same thing, but are separate entities in themselves. A coded example might be:</p>
<pre><code>&lt;a href=&quot;/&quot; title=&quot;Return to the homepage&quot; id=&quot;logo&quot;&gt;
  &lt;img src=&quot;/images/logo.gif&quot; alt=&quot;Nike logo&quot; /&gt;
&lt;/a&gt;
...
&lt;h1&gt;Welcome to Nike's international website&lt;/h1&gt;</code></pre>
<p>Sometimes a homepage doesn&#8217;t even require a <code>&lt;h1&gt;</code> to be visible. The logo alone is enough, but your page still needs that <code>&lt;h1&gt;</code> in the markup somewhere. It needs the logo to be an image but also needs a level one heading. Here you might want to have an &#8216;invisible&#8217; <code>&lt;h1&gt;</code> like I have here on CSS Wizardry. This means that semantically you&#8217;re marking up your logo as an image, as it should be, and providing a <code>&lt;h1&gt;</code> to screen-readers.</p>
<h2>What if you don&#8217;t have a logo?</h2>
<p>Some sites, CSS Wizardry included, don&#8217;t have a logo as such. I use a bit of browser text as a logo, but even though this is textual content I do not mark this up as a <code>&lt;h1&gt;</code>. I mark it up using an <code>&lt;em&gt;</code>. This is still a text-module element, and to my mind is semantically sound.</p>
<h2>Problems with using a <code>&lt;h1&gt;</code> to mark up a logo</h2>
<p>Although I did admit that the logo&#8217;s text might also be the title (<code>&lt;h1&gt;</code>) of the homepage, there&#8217;s a very good reason why you should not mark the logo up as one. What about your &#8216;about page&#8217;? The title of that page is undoubtedly &#8216;About me&#8217;, and the <code>&lt;h1&gt;</code> is a page&#8217;s title. It only stands to reason, then, that the page&#8217;s <code>&lt;h1&gt;</code> reads <code>&lt;h1&gt;About me&lt;/h1&gt;</code>.</p>
<p>If however I had marked up my logo as a <code>&lt;h1&gt;</code>, the about page&#8217;s title would also be the same as the homepage, and a <code>&lt;h2&gt;</code> would have to take place as the page&#8217;s actual title. This is wrong; obviously and unarguably wrong. And, by this token, your contact and portfolio and services pages&#8217; titles would all also be the same. This is the problem with marking logos up as <code>&lt;h1&gt;</code>s.</p>
<h2>More practical reasons</h2>
<p>And if you weren&#8217;t convinced enough already, using an inline image will actually make your life easier.</p>
<p>As previously mentioned, using an inline image allows  the logo to persist regardless of styles. This means that print stylesheets will have a logo embedded in the page as an image which they can print. Most printers, to conserve ink, will not print backgrounds, which means that any logos applied by means of a background image will be lost at print. Not great that your branding will be lost as soon as your site is printed, really.</p>
<p>Furthermore, an inline image can have its dimensions altered. A background image on a <code>&lt;h1&gt;</code> can&#8217;t. You can alter the size of the <code>&lt;h1&gt;</code>, but not its background (unless you&#8217;re using some CSS3 background magic). This means that you cannot easily adapt the logo to different sizes through CSS alone; think about optimising for mobile. A useful CSS snippet for any mobile site is:</p>
<pre><code>img{
  width:100%
  max-width:100%;
}</code></pre>
<p>This means that all images will fill, but not break out of, the mobile screen. If your logo is applied as a background image it&#8217;ll get ignored here. What might happen is that your <code>&lt;h1&gt;</code> will render narrower that its background image&#8217;s dimensions (i.e. the background image is wider in pixels than the device&#8217;s screen is) on a mobile device, giving the impression of clipping the logo off. Conversely, the <code>&lt;h1&gt;</code> might not fill the width of the page leaving it, and therefore its logo background, spanning only a percentage of the page.</p>
<p>You can manipulate a logo as an <code>&lt;img /&gt;</code> far easier than you can as a background.</p>
<h2>Stop applying logos as backgrounds</h2>
<p>This really is semantics and web standards basics. A logo is content, not style. Just because your site is named the same as your logo reads does not make them the same thing. A logo should not be applied as backgrounds, and especially not to <code>&lt;h1&gt;</code>s. Some of the industry&#8217;s &#8216;best&#8217; flaunt this lack of standards openly, and it&#8217;s just plain incorrect.</p>
<p>A logo is an image, a <code>&lt;h1&gt;</code> is a title. Your logo is never a background image, it&#8217;s never secondary content to anything. It is content in its own right and should be treated as such. Your logo is an image.</p>
<p>If you take only one thing from this article, let it be that <strong>your logo is content, therefore an image</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/feed/</wfw:commentRss>
		<slash:comments>104</slash:comments>
		</item>
		<item>
		<title>A reconsideration&#8212;in defence of &lt;b&gt; and &lt;i&gt; (or: people fear what they don&#8217;t understand)</title>
		<link>http://csswizardry.com/2010/01/a-reconsiderationin-defence-of-b-and-i-or-people-fear-what-they-dont-understand/</link>
		<comments>http://csswizardry.com/2010/01/a-reconsiderationin-defence-of-b-and-i-or-people-fear-what-they-dont-understand/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 23:06:10 +0000</pubDate>
		<dc:creator>Harry Roberts</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://csswizardry.com/?p=306</guid>
		<description><![CDATA[The other day, I got to thinking about the HTML elements &#60;b&#62; and &#60;i&#62;, and wondered if they were still viably usable in production code. I&#8217;ve personally never used them before but I was aware that they existed and were still very much valid XHTML markup (even in the Strict DOCTYPE!). Wondering whether I&#8217;d avoided [...]]]></description>
			<content:encoded><![CDATA[<p><span class="opener"><span>T</span>he</span> other day, I got to thinking about the HTML elements <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code>, and wondered if they were still <em>viably</em> usable in production code. I&#8217;ve personally never used them before but I was aware that they existed and were still very much valid XHTML markup (even in the Strict <code>DOCTYPE!</code>). Wondering whether I&#8217;d avoided two elements for three years unnecessarily, I did some digging.</p>
<h2>What the facts state</h2>
<p><code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> <em>are</em> still valid, and as XHTML is just an XML serialisation of HTML, pretty much all the elements apparent in the HTML spec are true of the XHTML spec too&mdash;it is, pretty much, just the way in which these elements are written that makes them different in XHTML.</p>
<h2>Twitter</h2>
<p>With the help of <a href="http://twitter.com/smashingmag" title="Smashing Magazine on Twitter">@smashingmag</a> I turned to <a href="http://twitter.com/csswizardry">Twitter</a> and my knowledgeable followers and asked the question:</p>
<blockquote><p>&ldquo;Using &lt;i&gt; and &lt;b&gt; in (valid) XHTML (strict)… your thoughts on this would be much appreciated. #upcomingBlogPost Cheers all!&rdquo; <strong><a href="http://twitter.com/csswizardry" title="Harry Roberts on Twitter">@csswizardry</a></strong></p>
</blockquote>
<p><span id="more-306"></span></p>
<p>Most of the answers I got said petty much the same thing: use <code>strong</code> and <code>em</code> &#8230; <code>b</code> and <code>i</code> are deprecated. While this is largely true, there are some myths that need dispelling.</p>
<ul>
<li><code>strong</code> and <code>em</code> are <em>not</em> the same as bold and italics. strong is strong emphasis and em is emphasis. <strong>It is purely through convention that these two elements happen to adopt either bold or italicised appearances.</strong></li>
<li><code>b</code> and <code>i</code> are <em>not</em> deprecated in any way in HTML or XHTML. <strong>They are still in existence, still valid and still (in the right places) usable.</strong></li>
</ul>
<h3>Some replies</h3>
<p>A few choice replies I received which are, on the whole, representative of everyone&#8217;s thoughts:</p>
<blockquote><p>&ldquo;strong and em make more sense, especially when taking screen readers into account. <strong><a href="http://twitter.com/CreativeNotice" title="CreativeNotice on Twitter">@CreativeNotice</a></strong></p>
</blockquote>
<p>Or so you&#8217;d think, <a href="#fallacy">see below&#8230;</a></p>
<div class="hr">
<hr /></div>
<blockquote><p>&ldquo;I prefer &lt;strong&gt; &lt;/em&gt; because of semantics . You want to put emphasis, not just make text italic.&rdquo; <strong><a href="http://twitter.com/wehelpdesign" title="WeHelpDesign on Twitter">@WeHelpDesign</a></strong></p>
</blockquote>
<p>True, if you <em>do</em> just want emphasis that is&#8230;</p>
<div class="hr">
<hr /></div>
<blockquote><p>&ldquo;Using &lt;i&gt; and &lt;b&gt; is just fine if it&#8217;s for visual bling without real semantic background.&rdquo; <strong><a href="http://twitter.com/levito" title="Veit Lehmann on Twitter">@levito</a></strong></p>
</blockquote>
<p>Ah, this is more like it!</p>
<div class="hr">
<hr /></div>
<blockquote><p>&ldquo;&lt;b&gt; and &lt;i&gt; tags describe presentation, not structural semantics. Rather style &lt;em&gt; and &lt;strong&gt; tags.&rdquo; <strong><a href="http://twitter.com/hornergraphic" title="Stephen Horner on Twitter">@hornergraphic</a></strong></p>
</blockquote>
<p>A view that is seemingly shared by almost everyone else who responded.</p>
<div class="hr">
<hr /></div>
<h3>What about strong and em?</h3>
<p>The vast majority of people who replied were in favour of <code>strong</code> and <code>em</code> over <code>b</code> and <code>i</code>. Presuming all respondents were assuming the question was &#8216;What are your thoughts on using <code>b</code> and <code>i</code> to represent strong emphasis and emphasis, and thus replace <code>strong</code> and <code>em</code>?&#8217; then they&#8217;d have all been spot on correct. However, <code>b</code> and <code>i</code> and <code>strong</code> and <code>em</code> are  totally separate things. <code>b</code> and <code>i</code> assume no semantic value, meaning literally bold and italic respectively. <code>strong</code> and <code>em</code> however have nothing to do with bold or italics. As previously mentioned, it is through convention only that the default styling for each is so.</p>
<p><code>strong</code> and <code>em</code> are &lsquo;spoken word&rsquo; type elements, where they represent a change in tone only. This means that their styling is in no way linked to their naming, it is just that us, as people, are familiar with italicised prose sounding more stressed&mdash;or emphasised&mdash;than surrounding text. This is where the importance of aforementioned semantics and screenreaders come in. Or is it&#8230;?</p>
<h4 id="fallacy">The screenreader fallacy</h4>
<p class="marginalia">Screenreaders <em>don&#8217;t</em> use <code>strong</code> and <code>em</code>!</p>
<p>The common belief is that <code>strong</code> and <code>em</code>&#8217;s semantic meaning is used by screenreaders to alter tonality when reading content aloud, thus letting the user know that the copy is in fact meant to be understood in a different manner to any neighbouring text. This was something I too believed until the wonderfully knowledgeable <a href="http://twitter.com/pekingspring">@pekingspring</a> pointed me toward <a href="http://www.paciellogroup.com/blog/?p=41" title="An article covering the way screenreaders handle emphasised text">this article</a> by <a href="http://twitter.com/stevefaulkner">@stevefaulkner</a>&mdash;it turns out screenreaders <em>don&#8217;t</em> use <code>strong</code> and <code>em</code> to alter tonality!</p>
<p>This means that screenreaders see no semantic value in the <code>strong</code> and <code>em</code> element. However, they should be used <em>unconditionally</em> where a change in tone is implied, whether a screenreader will understand this or not.</p>
<h3>Where to use &lt;b&gt; and &lt;i&gt; then?</h3>
<p>One of my first thoughts was where to use these elements if indeed they are still usable. My initial idea was the use of <code>i</code> for markup up things that have to be italicised but the italics aren&#8217;t indicative of any tone. To quote the <cite>Penguin Guide to Punctuation</cite>:</p>
<blockquote><p>&ldquo;Another use of italics &#8230; is to cite titles of complete works&#8230;&rdquo;</p>
</blockquote>
<p>Initially I thought this was the ideal use for the <code>i</code> element&mdash;something that had to be in italics, yet implied no tone of voice. It was such a good fit! However, <a href="http://twitter.com/pekingspring">@pekingspring</a> came to my aid again and reminded me that the <code>cite</code> element is for this exact purpose. That was that idea gone.</p>
<p>Another possible usage for the <code>i</code> element was gleaned from the <cite><a href="http://typographyapp.com/">Typography Manual</a></cite> iPhone app, which states:</p>
<blockquote><p>&ldquo;Italics should be used for single letters in a sentence referred to as letters. [for] example &lsquo;The letter <i>j</i> appears too large.&rsquo;&rdquo;</p>
</blockquote>
<p>An idea I had for using <code>b</code> was somewhat linked to the <code>cite</code> element anyway. A common mistake is to markup the &#8216;author&#8217; of a quote in <code>cite</code> tags. This is of course incorrect, but what <em>do</em> you use? It&#8217;s not really a paragraph, so what is it? I did consider the <code>b</code> element for this, but I feel that such a piece of information does need a more semantic element to represent it.</p>
<p>Friend and colleague <a href="http://twitter.com/simonwiffen">@simonwiffen</a> has a very nicely written example usage for each, which I personally think are spot on. The following chunk of text is lifted directly from an internal document written by <a href="http://twitter.com/simonwiffen">@simonwiffen</a>:</p>
<div class="hr">
<hr /></div>
<p><strong>1.4.3 Strong, emphasis, bold and italic</strong></p>
<p><code>&lt;strong&gt;</code> (strong emphasis) and <code>&lt;em&gt;</code> (emphasis) should be used as opposed to <code>&lt;b&gt;</code> (bold) and <code>&lt;i&gt;</code> (italic) unless the bold or italic is required without any semantic context (for example in a product name).</p>
<p><strong>Examples</strong></p>
<p>Remember <strong>you must</strong> check this box</p>
<pre><code>&lt;p&gt;Remember &lt;strong&gt;you must&lt;/strong&gt; check this box.&lt;/p&gt;</code></pre>
<p>You should <em>really</em> try to validate your pages</p>
<pre><code>&lt;p&gt;You should &lt;em&gt;really&lt;/em&gt; try to validate your pages&lt;/p&gt;</code></pre>
<p>Read more about <b>Splash<i>down</i>!&trade;</b> below</p>
<pre><code>&lt;p&gt;Read more about &lt;b&gt;Splash&lt;i&gt;down&lt;/i&gt;!&trade;&lt;/b&gt; below&lt;/p&gt;</code></pre>
<div class="hr">
<hr /></div>
<p>Succinct and, in my opinion, pretty hard to argue with.</p>
<h4>HTML5 has it sussed</h4>
<p class="marginalia">I won&#8217;t be using HTML5 for a long while yet, but that&#8217;s another story altogether&#8230;</p>
<p>Ideally I&#8217;d like to retrofit the HTML5 specification&#8217;s definitions of each for use right now in XHTML, however I&#8217;m not sure I&#8217;d be comfortable going ahead with doing such a thing, coding to one spec whilst picking my favourite bits of another.</p>
<h5>The &lt;b&gt; element in HTML5</h5>
<blockquote><p>&ldquo;The b element represents  a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened.&rdquo;</p>
<p><cite><a href="http://dev.w3.org/html5/spec/Overview.html#the-b-element">HTML5</a></cite></p></blockquote>
<h5>The &lt;i&gt; element in HTML5</h5>
<blockquote><p>&ldquo;The i  element represents  a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.&rdquo;</p>
<p><cite><a href="http://dev.w3.org/html5/spec/Overview.html#the-i-element">HTML5</a></cite></p></blockquote>
<h3>A go-between in the meantime?</h3>
<p>There will always be the argument that instead of using <code>b</code> and <code>i</code> you could or should use something like &lt;span class=&quot;italics&quot;&gt; or &lt;span class=&quot;bold&quot;&gt; so as to avoid using insemantic elements, however a class name like that is more insemantic than an in-spec HTML element. Not to mention the fact that a <code>span</code> with a <code>class</code> applied is far more cumbersome than a &#8216;pre-made&#8217; piece of HTML.</p>
<h3>The resolve?</h3>
<p>So which is worse?</p>
<ul>
<li>Using <code>i</code> to mark up emphasised text</li>
<li>Using <code>em</code> to mark up italicised and non-emphasised text</li>
<li>Using <code>i</code> to mark up purely italicised text</li>
<li>Using <code>&lt;span class="italics"&gt;</code> to mark up italicised text</li>
</ul>
<p class="marginalia">Special thanks to the following for help with this article: <a href="http://twitter.com/smashingmag" title="Smashing Magazine on Twitter">@smashingmag</a>, <a href="http://twitter.com/pekingspring">@pekingspring</a>, <a href="http://twitter.com/stevefaulkner">@stevefaulkner</a>, <a href="http://twitter.com/simonwiffen">@simonwiffen</a> and all <a href="http://twitter.com/csswizardry/followers">my Twitter followers</a>.</p>
<p>I think that the fact that <code>b</code> and <code>i</code> are still in the spec, are valid (even in strict) and are being carried over to HTML5 (albeit slightly redefined) indicates that there is still a very real place for them in web development right now. The frequency with which they&#8217;ll be used is slim at best, but they should not be ruled out, and at the very least not misunderstood. I&#8217;m not going to make the leap myself just yet, but they are there, they are usable, and one day I might just use them.</p>
<p>What are you going to do?</p>
]]></content:encoded>
			<wfw:commentRss>http://csswizardry.com/2010/01/a-reconsiderationin-defence-of-b-and-i-or-people-fear-what-they-dont-understand/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

