demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 1.5K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Italicizing and Bolding Text

html / typography

Estimated reading time: 1 minute, 5 seconds

HTML is designed to be as independent of medium and client as possible. While you interact with the majority of web pages visually via a screen, there are numerous other possibilities for how the content may be shown, such as print, text-to-speech readers, braille translators, and more.

For this reason, tags that format text in HTML are as broadly applicable as possible. <em>, for instance, emphasizes text. In most cases, visually rendered <em> content means it is italicized, but a text-to-speech tool will emphasize the text verbally, just as you would reading the text out loud.

<strong>, visually, bolds the content between the opening and closing <strong> tags, but again, the tag will have different meanings in different contexts.

Both tags are intended to be used on a short portion of text – a word or two, perhaps a sentence in a paragraph that is several sentences long. If you find yourself coding this:

<p><em> .. lots of content here .. </em></p>

… it is almost always a sign that you should not be using <em> or <strong> but instead.

Similarly, <strong> makes little to no difference inside of heading elements. Use CSS instead.

reintroduces the <b> and <i> tags, but I would recommend sticking with <strong> and <em>, as the latter have greater applicability and accessibility.

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.