plain-site › type
The browser ships a complete typographic system: six heading levels, a dozen inline
elements that each look different, monospace, quotation marks that follow the language, and
furigana. Before reaching for <font>, use the element that means
the thing. It renders differently because it is different.
All of these are current, conforming HTML. Each has a default rendering in every browser.
h1 is 2em, h6 is 0.67em. Since 2025 browsers no longer shrink an <h1>
nested inside <section> or <article>, so the level you
write is the size you get.
size takes 1 to 7 (3 is normal) or a relative +n /
-n. <big> is the obsolete twin of <small>.
Both are obsolete and both still render everywhere.
face is a font list, like font-family. The generic names always
resolve to something on every system. Named fonts only work where they are
installed, so always end the list with a generic.
The lang attribute changes rendering. With lang="ja" the browser
picks a Japanese font for CJK text (otherwise it may fall back to Chinese forms of the same
characters), and <q> uses 「」 brackets instead of “”.
<ruby> puts small text above characters. Built for Japanese reading
aids, it works for any annotation. <rp> holds the parentheses that show
only in browsers without ruby support.
Japanese web pages decorate with typography, not images: section marks, brackets, notes, arrows. They are text, so they are free, they scale, they copy and paste, and they read the same with styles off. Keep a glyph next to a word, never instead of it.
Preformatted text keeps every space and line break. Box-drawing characters turn it into
diagrams, tables, and banners that survive copy-paste into an email or a terminal.
<pre wrap> (obsolete) wraps long lines.
<xmp> is obsolete, and it is the most useful obsolete element for a
documentation site. Its content is raw text: tags inside it are shown, not parsed, so you
paste HTML in and never write <. The only thing it cannot contain is its
own closing tag. <listing> renders like <pre> but does
parse tags.
<nobr> (obsolete) never breaks its content. <wbr>
(conforming) marks where a long word may break. glues two
words.
▲ top ・ plain-site ・ previous: colour ・ next: layout