Text Elements

Most of a web page is running text: paragraphs sprinkled with links, emphasis, quotations, code, dates and abbreviations. HTML gives each of these a dedicated text-level element, and nearly all of them belong to the phrasing content category from Content Categories: they sit inside a paragraph or heading without starting a new block.

The choice matters beyond looks: a <time datetime="2026-09-15"> can be parsed by a crawler, a <kbd> tells a documentation tool that the text is a keystroke, and a <bdi> stops an Arabic user name from scrambling the sentence around it. The default styling is only a side effect you can change with CSS (CSS). Ask what the text is, not how it should look; if no element describes it, use a meaningless <span> with a class.

HTML 4's presentational tags and a few early ruby elements are obsolete: browsers render them, validators flag them.

Obsolete text elements and their replacements
Obsolete element Use instead
<font>, <center>, <big> CSS (font-*, color, text-align), or <strong> / <mark>
<tt> <code>, <kbd>, <samp> or <var>
<strike> <del> for edits, <s> for outdated content
<acronym> <abbr>
<rb>, <rtc> Plain base text inside <ruby>, or nested <ruby>

Subsections