Reputation: 105
I'm trying to determine a best practice for the HTML I use with titles (books, movies, songs, etc.). I'm trying to figure out if an <em>
is correct, or an italicized <span>
, or something else. Would it be semantically correct to use an <em>
tag/element for titles, according to the HTML spec or common practice?
For example, here is an excerpt of a book review for a book titled: "Reaching & Teaching Them All", and I want to know how to mark up the title itself:
"Initial meetings with students are key to making a good first impression and offer a critical opportunity to put children at ease. By carefully orchestrating your relationship with students in those early encounters, you can create a better learning environment that will help to encourage listening and learning. Reaching & Teaching Them All suggests various ways for getting and maintaining student attention and interest, including telling stories, playing games, embracing body language, and using humour and sarcasm."
Upvotes: 3
Views: 1101
Reputation: 19498
Well, the thing is: a title is not emphasized, per se. So, if you're aiming for semantic significance, I think the simple answer is: No, an <em>
is not the right option.
One good simple guide is offered by Mozilla, in their docs on <em>
. It's not canon, but it's pretty close:
The element is for words that have a stressed emphasis compared to surrounding text, which is often limited to a word or words of a sentence and affects the meaning of the sentence itself.
So, unless you're altering the meaning or stress of the sentence, <em>
isn't recommended. Instead, they suggest:
Use the
<cite>
element to mark the title of a work (book, play, song, etc.).
Then, use CSS to set the presentational styling of the <cite>
to be italic.
Upvotes: 7