Both of them emphasize text. The <em>
tag shows text as italics, whereas <strong>
makes it bold. Is this the only difference?
The main difference between these two tag is that the strong tag semantically emphasizes on the important word or section of words while the bold tag is just offset text conventionally styled in bold. Below is the code to show this difference. Example 1: HTML.
By default, the visual result is the same. The main difference between these two tag is that the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show alternative mood or voice.
Definition and Usage The <em> tag is used to define emphasized text. The content inside is typically displayed in italic. A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.
The <strong> tag is used to define text with strong importance. The content inside is typically displayed in bold. Tip: Use the <b> tag to specify bold text without any extra importance!
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.
<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.
For example:
In spite of what some might say, there is a semantic difference between the elements.
For a clear distinction between stress emphasis and importance, and more examples, see the HTML 5 draft.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With