Text and meaning
Emphasis and importance
Mark words as emphasized or important with semantic text elements instead of choosing tags only for their default visual style.
5 minute lesson
~~~
The em element adds emphasis. It can change the meaning of a sentence.
<p>You should <em>always</em> wear a helmet.</p>
Browsers display em as italic by default, but the meaning matters more than the style.
The strong element marks serious importance, urgency, or warning:
<p><strong>Do not leave your bicycle unlocked.</strong></p>
Browsers display strong as bold by default.
HTML also has i and b. They do not mean exactly the same thing:
emis stress emphasisstrongis importanceimarks text set apart from normal prose, such as a foreign phrase or technical termbdraws attention without adding importance, such as a keyword in a summary
Ask what the text means before choosing the element. If you only want italic or bold styling, CSS is usually the right tool.
Quick check
Result
You got of right.
Lesson completed