views:

441

answers:

7

Should book titles be contained in an <em> tag? If not <em> is there more appropriate markup?

A: 

Grammar rules state that book titles (or the titles of other "long" works) should be italicized or underscored. Therefore, the tag is appropriate.

Stephen Wrighton
The em tag does not specify italic text or an underscore, but emphasis. Thus I don't think the tag is appropriate.
Chuck
the default display for an EM tag is italicized text. The point of the grammar rule is that the title is emphasized (which traditionally is done via italics/underscoring), therefore, the tag is appropriate. Ultimately, I would build the tag like this: <em property="dc:title" class="LongWorkTitle">Star Wars</em>
Stephen Wrighton
The cite element indicates a citation, and by default is rendered in italics. The convention for scientific Latin terms is to render them in italics. Therefore scientific Latin terms should be marked up with cite elements. Dogs have four legs. My cat has four legs. Therefore my cat is a dog. Your logic is flawed.
David Dorward
But the CITE element is for ANY title, not necessarily the title of a long work. Therefore, it places too much of an emphasis on some items. Scientific terms are to be rendered in italics to place an emphasis on them--and again, I'd use the EM for that. My logic is: Dogs have four legs, Cats have four legs, therefore both are 4-legged animals. And yes, the CITE element is probably a more appropriate tag than EM, but CITE is used about as much as BLINK. In a decade doing Dev Work, I've never used it, nor seen it used.
Stephen Wrighton
"The title should be emphasised" is a valid reason to use em. "The title should be rendered in italics" is not. The argument you make in your answer is the latter. (And I have used cite and seen it used by others).
David Dorward
+1  A: 

I would use RDFa with any tag. The RDFa specificaton allow you to add some semantic in your HTML. for example your titles would be annotated with the Dublin-Core property dc:title.

Pierre
A: 

For something like a book title that conveys semantic information, the answer is no. You should do something like:

<span class="BookTitle">War and Peace</span>

and then use CSS to style BookTitle as you please.

Paul J. Lucas
+1  A: 

It really depends on the context.. They might even use <h1-6>-tags depending on how and where you display the book titles. If you display it in a list of books, you could use a definition list with the <dt> tag as the book title, and <dd> tag(s) for the author(s).

There is really no "semantically correct" tag for a book, but you can create a markup that is easy to read and makes sense.

<dl class="booklist">
    <dt class="book">Book title</dt>
    <dd class="author">The author</dd>

    <dt class="book">Awesomest markup Evah!</dt>
    <dd class="author">HTML Wiz Kid</dd>
    <dd class="author">Tagz are Me</dd>
</dl>
PatrikAkerstrand
A: 

Doubt so. Semantically "em" means "emphasis" not "italics".

Well, HTML lacks a lot of things, so I'd either just use generic <span class="book-title">Foobar</span> or if I'll feel a crazy I'll just invent my own tag (who said I can't? it will validate perfectly with customized DTDs or I may use XSLT to transform the document).

drdaeman
A: 

Concerning tags like <em> and <strong>, w3schools.com states that "They are not deprecated, but it is possible to achieve richer effect with CSS." So I would say that it is appropriate for a book title unless you prefer using CSS for all text formatting (as I do).

DLH
Just because something isn't deprecated doesn't mean it should be used for every task. Certainly <em> and <strong> should not be used for text formatting - they are semantic elements. As usual, W3Schools is providing misleading information.
David Dorward
<em> and <strong> are semantic tags, <i> and <b> are not
PatrikAkerstrand
+9  A: 

<em> is definitely wrong. In addition to the other suggestions given before me such as RDFa or a semantic class name, consider using <cite>

From the HTML 5 draft:

The cite element represents the title of a work (e.g. a book, a paper, an essay, a poem, a score, a song, a script, a film, a TV show, a game, a sculpture, a painting, a theatre production, a play, an opera, a musical, an exhibition, etc). This can be a work that is being quoted or referenced in detail (i.e. a citation), or it can just be a work that is mentioned in passing.

Alohci