Friday, January 3

Stephen:

As an aside, I know that the html tag "i" has been deprecated to "em" but what is the correct tag to use when you explicitly want to italicize something instead of emphasizing it (a book title, for example).

At this stage of the game, I'm pretty sure that the official line (if there's such a thing) is that you should use CSS for all explicit physical text styles (bold, italic, underlined, etc.), and content based markup like <em> to describe the text.

The <em> tag defaults to italicized text in all of the graphical browsers I'm aware of, but if you want to be explicit about styling, you can approach it a couple of ways. The simplest is probably to use <em> and explicitly set its font-style to italic in your stylesheet:

em {
   font-style: italic;
}

For finer grained control than that, you could define a couple of different classes of <em> tag in the stylesheet:

em.book {
   font-style: italic;
}

em.album {
   font-variant: small-caps;
   font-style: italic;
}

And then use, for example, <em class="book">River Teeth</em>. This is the approach I'd take if I felt the need.

Furthermore, for any given element, you can also insert a style="..." attribute with specific style information. And I believe the <span> element can be used to apply style to any text you don't want to enclose in content based markup. So you could also do <em style="font-style: italic;">A Scanner Darkly</em> or <span style="font-style: italic">For the New Intellectual</span>.