liveBook · Manning

Em element

As explained in Build a Website with ChatGPT

The em element is an HTML element that marks text with semantic emphasis or stress.

The em element marks a word or phrase that should receive extra emphasis or spoken stress. Browsers usually display the marked text in italics, but its meaning is semantic rather than merely visual. section 12.2.6

Emphasize an important word

Use the opening and closing tags around the word that needs added stress: <em>vital</em>. In a sentence, this can appear as: “When mixing pie pastry, it's <em>vital</em> that your butter is as cold as possible.”

Choose em when stress helps get the point across; choose strong when the text is inherently crucial. The elements can be nested, so a stressed word inside important text can appear both italic and bold. section 12.2.6

The em element may look like ordinary italics in a browser, but it communicates emphasis in the HTML. Use the i element instead for alternative text such as titles, technical terms, foreign phrases, or thoughts. section 12.2.6 section 12.6

How Build a Website with ChatGPT covers it

How deep it goes
Explains semantic purpose, browser rendering, comparison with strong and i, and nesting, but does not detail CSS customization.
Examples
Uses an emphasized word in a pie-pastry sentence and contrasts emphasis with important, keyword, and alternative text examples.
What it assumes
Assumes basic familiarity with HTML tags while teaching the element’s purpose and syntax directly.
What you can do after
Apply the em element to mark text that should receive added stress in an HTML sentence.
How it connects
Connects HTML semantics with the strong element, i element, and assistive technologies.

Also explained in

Compare how 2 books explain em element →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.