What is the difference? both emphasize the text . <em>
shows text as italics, is this the only difference?
views:
301answers:
5<strong> is a tag you'd put around a sentence or phrase to indicate that "this is more important than the surrounding text".
<em> is generally used to indicate the stress of a word within a sentence.
E.g. In spite of what some might say, there is a semantic difference between the elements.
Edit: For a clear distinction between stress emphasis and importance, and more examples, see the HTML 5 draft. http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-em-element
Yeah, the definition of what ‘strong emphasis’ is compared to just ‘emphasis’ is pretty woolly. The only standard definition would be “it's emphasised, but more!!”.
Personally I use <em>
for normal emphasis where you'd read the emphasised word in a different tone of voice, and <strong>
for that thing where you take key words and phrases to pick them out of the text to help people skimming the text pick out the subjects.
This isn't a standard interpretation, but it makes some sense and rendered appropriately by the default italic/bold styles. Whatever you do, be consistent.
Note that the difference is going to change:
In HTML 4.01, the
<strong>
tag defined strong emphasized text, but in HTML 5 it defines important text.
Doesn't make the issue any clearer, does it?