I have heard that using the newer <strong>
tag as opposed to <b>
creates an ability for some devices to make text "strong" that was already bolded-as in the case of a palm pilot, where it would be underlined if you used <strong>
.
I have also heard that older browsers cannot recognize <strong>
and <em>
and just ignore them, but newer browsers recognize both the old and new tags, making it an advantage to use the older tags if your users/viewers might have old browsers-however some newer devices benefit from the newer tag (like the <strong>
vs <b>
).
So I was wondering-how does the <em>
tag show up on, say, a palm pilot, or similar devices?
What is the advantage and disadvantage of using <em>
vs <i>
? Or vice-versa?
~Added after comments and marked as "duplicate"~
Since this seems to some to be a duplicate question, but I can't find my answer, I will rephrase:
i has the purpose of presenting something in italicised style. em has the purpose of giving emphasis to the content. In practice emphasised content is typically displayed italicised, so the difference on the face of it is non-existing from a presentation standpoint.
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.
b or i means you want the text to be rendered as bold or italics. strong or em means you want the text to be rendered in a way that the user understands as "important".
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.
It's about semantics. Using strong
or em
means that the contents of the tag have more emphasis than the nearby copy.
Bolding or italicizing stuff is just formatting. And formatting belongs in css, not html.
The purpose of HTML is to mark up text semantically, meaning to give it meaning. This is explicitly separate from presentation, which is to be handled by CSS.
i
has the purpose of presenting something in italicised style.em
has the purpose of giving emphasis to the content.
In practice emphasised content is typically displayed italicised, so the difference on the face of it is non-existing from a presentation standpoint. However, emphasis is semantic while italics is presentation. to make HTML a truly semantic markup. It may seem like nitpicking, but at least it's thorough.i
was deprecated in favour of em
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