The Double Emphasis Thing
I used to have this boss who loved, loved, loved, loved to emphasize words. This was way back before we used a WYSIWYG editors and I’d have to handcode that crap.
(Let’s not go into the colors he used for even MOAR emphasis.)
Writing all that markup never felt great. The effort it took, sure, whatever. But is it even a good idea to add overload content with double — or more! — emphases?
For starters, the
<em> tags are designed for different uses. We got them back in HTML5, where:
<strong> gives the content more weight in the sense it suggests that the content in it is important or urgent. Think of a warning:
Warning: The following content has been flagged for being awesome.
It might be tempting to reach for
<em> to do the same thing. Italicized text can be attention-grabbing after all. But it’s really meant as a hint to use more emphasis when readingt the content in it. For example, here are two versions of the same sentence with the emphasis in different locations:
Both examples stress emphasis, but on different words. And they would sound different if you were to read them out loud. That makes
<em> a great way to express tone in your writing. It changes the meaning of the sentence in a way that
<strong> does not.
Those are two things you gotta weigh when emphasizing content. Like, there are plenty of instances where you may need to italicize content without affecting the meaning of the sentence. But those can be handled with other tags that render italics:
It’s going to he the same thing with
<strong>. Rather than using it for styling text you want to look heavier, it’s a better idea to use the classic
<b> tag for boldfacing to avoid giving extra signficance to content that doesn’t need it. And remember, some elements like headings are already rendered in bold, thanks to the browser’s default styles. There’s no need to add even more strong emphasis.
There are legitimate cases where you may need to italicize part of a line that’s already emphasized. Or maybe add emphasis to a bit of text that’s already italicized.
A blockquote might be a good example. I’ve seen plenty of times where they are italicized for style, even though default browser styles don’t do it:
What if we need to mention a movie title in that blockquote? That should be italicized. There’s no stress emphasis needed, so an
<i> tag will do. But it’s still weird to italicize something when it’s already rendered that way:
In a situation where we’re italicizing something within italicized content like this, we’re supposed to remove the italics from the nested element…
<i> in this case.
This little snippet evaluates the blockquote to see if it’s
font-style is set to
italic. If it is, then it’ll make sure the
<address> elements are rendered as normal text, while retaining the semantic meaning if there is one.
I wouldn’t nest
<em> like this:
The reason I wouldn’t nest one form of emphasis in another is because it simply isn’t needed. There is no grammar rule that calls for it. Like exclamation points, one form of emphasis is enough, and you ought to use the one that matches what you’re after whether it’s visual, weight, or announced emphasis.
And even though some screen readers are capable of announcing emphasized content, they won’t read the markup with any additional importance or emphasis. So, no additional accessibility perks either, as far as I can tell.
If you’re in the position where your boss is like mine and wants ALL the emphasis, I’d reach for the right HTML tag for the type of emphasis, then apply the rest of the styles with a mix of tags that don’t affect semantics with CSS to help account for anything browser styles won’t handle.
I might even do it with the
<strong> tag too as a defensive measure:
As long as we’re playing defense, we can identify errors where emphases are nested within emphases by highlighting them in red or something:
Then I’d probably use that snippet from the last section that removes the default italic styling from an element when it is nested in another italiczed element.
If you need help creating a digital marketing strategy for your business, don’t hesitate to contact one of Digidude’s consultants.