3 ms·
<i> for things that should be italic for visual reasons. For example, the titles of books. <em> for things that are emphasized, as in emphatic expressions with
by reaperducer 4y ago
<i> for things that should be italic for visual reasons. For example, the titles of books.
<em> for things that are emphasized, as in emphatic expressions within text. For example "You'll get nothing and you'll like it."
- gnubison 4y ago*<cite>
- Tomte 4y ago<cite> is also pure joy. From MDN: > It's worth noting that the W3C specification says that a reference to a creative work, as included within a <cite> element, may include the name of the work's author. However, the WHATWG specification for <cite> says the opposite: that a person's name must never be included, under any circumstances.
- mananaysiempre 4y agoThere are also other things that are not emphasized, but require italics per typographical convention, <i lang="la">e.g.</i> foreign-language fragments.
- nirimda 4y agoIt doesn't have clear semantics. <cite> is basically used as "I want something in italics, and it is the title of something" rather than "here is a reference to a creative work". And it gives the lie to semantic markup: we only ever have semantic markup for things we can reasonably expect to be visually set-off. Something like a persons name or a cut-off phrase are never marked up semantically; there could be massive benefits from semantically attributing lists of city/state combinations in flowing text but it just doesn't happen. There's nothing more than semantically attributed visual markup, rather than being semantic markup, and this kind of renaming of <i> is just going overboard.
- yakubin 4y agoTIL. ~15 years ago I read "don't use <i>, use <em>", and so I did. Now it seems I need to go and change a bunch of <em>s to <i>s.