Full answer
Text-level elements add meaning to a few words inside a paragraph. They help assistive tools, search engines and browser features, and they have useful default styles.
timemarks a date or time. Thedatetimeattribute holds a machine-readable value, such as2026-12-04or2026-12-04T10:30, while the text can be anything, such as "Friday". Tools can use it for calendars and rich results.abbrmarks an abbreviation. Thetitleattribute holds the full form, and browsers draw a dotted underline. A tooltip fromtitleis not reachable by keyboard or touch, so spell the term out at its first use too.markhighlights text that is relevant right now, for example a search match. It is not for plain decoration.kbdmarks keys or input the user types, such as Ctrl + S.codemarks code,sampmarks sample output andvarmarks a variable. They use a monospace font by default.addressgives contact information for the nearest article or for the whole page. It is not for any postal address in the text.qis a short inline quote, and the browser adds quotation marks.blockquoteis for long quotes, withciteto name the source.strongshows strong importance andemshows stress in speech.bandiare for style with no extra meaning, such as a product name or a technical term.sup,subandsmallare for superscripts, subscripts and fine print such as legal text.
Use the element that matches the meaning, then style it with CSS. Do not use strong just to make text bold, and do not skip the element because you can fake the look.
The time element carries a precise value for tools. The keys use a monospace font, the abbreviation has a dotted underline and the match has a yellow background by default. The address is shown in italics in most browsers.
Choose by meaning, and check the default styles for your design.
<p>The event is on <time id="t" datetime="2026-12-04T10:30">Friday morning</time>.
Press <kbd id="k">Ctrl</kbd> + <kbd>S</kbd> to save.
<abbr id="a" title="HyperText Markup Language">HTML</abbr> is simple.
Search result: <mark id="m">flexbox</mark> guide.</p>
<address id="ad">Write to <a href="mailto:hello@example.com">hello@example.com</a></address>Run in Chrome 156 (headless) as a page; the snippet is wrapped in a minimal HTML document with doctype, charset and viewport meta tag. Two full runs gave identical results, and the measured values in the answer come from them.
Key points
- time holds a machine-readable date in datetime.
- abbr gives the full form, but spell it out too.
- mark highlights relevant text.
- kbd, code and samp mark input, code and output.
- Choose by meaning, not by default look.
Common mistakes
- Using strong or em only to change how text looks.
- Relying on the abbr title as the only place where the full form appears.
- Using address for any postal address inside an article.
Follow-ups
- What is the difference between strong and b?
- Why is the datetime attribute useful?
Tips
- Pick three or four elements and say what each means.
- Say that the choice is by meaning, and styles come second.