DEV Community

Discussion on: HTML 5 and The Legends of the Elements

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

It goes beyond just that. <em> doesn't even have to be italic at all, and nested <em> elements represent increasing levels of importance and can therefore be styled with increasingly noticeable visuals.

To quote the spec:

The em element isn't a generic "italics" element. Sometimes, text is intended to stand out from the rest of the paragraph, as if it was in a different mood or voice. For this, the i element is more appropriate.

So no, you actually should be using <i> if you really want italic content for the sake of being italic, and <em> only if you want to add emphasis without caring much about how that emphasis is visually achieved.

Collapse
 
whitehatdevv profile image
Manu Martinez

Yes, it's exactly another point of view focusing in nested <em> tag, we have just adopted your recommendation to even clarify more the difference between these two tags. We really appreciate your interesting and the effort you have put writing this comment 😄

Thanks you for reading our post 😇