The Emphasis element
The element is used to indicate words that carry a stressed emphasis in comparison to surrounding text. This often applies to a single word or a few words within a sentence and can significantly affect the sentence's overall meaning.
Typically, the element displays in italic type. However, it's essential to note that the element should not be used solely for italic styling; instead, the CSS font-style property is recommended for that purpose. Use the element to denote the title of a work, such as a book, play, or song, while the element is appropriate for marking text that conveys an alternate tone or mood, including scientific names or words in other languages. The element is reserved for text that holds greater importance than the surrounding content.
Many developers might confuse the and elements, as both typically render text in italics. However, they serve distinct purposes. The element conveys stressed emphasis, whereas the element signifies text that diverges from normal prose—like foreign words, character thoughts, or definitions (titles of works should be marked with ). It's crucial to choose the right element based on context, as neither is intended for purely decorative uses; CSS styling should handle that.
Here are examples of how to use the element:
Just do it already!
We had to do something about it.
In these instances, a reader or software interpreting the text would emphasize the italicized words when spoken.
Conversely, here are examples of the element:
The word the is an article.
The Queen Mary sailed last night.
In these cases, the italicized "Queen Mary" indicates that it refers to a ship rather than a person named Mary who is a queen.
For instance, the element can be utilized to highlight a contrast between two ingredient lists:
Ice cream is made with milk, sweetener, and cream. Frozen custard, on the other hand, is made of milk, cream, sweetener, and egg yolks.