Headings h1–h6
H1
H2
H3
H4
H5
H6
hgroup: grouped heading
Subtitle inside hgroup
Text and semantics
p – a regular paragraph of text. A line break via
br here.
New line.
strong | em | b (bold) |
i (italic) | u (underline) | s
(strikethrough) |
del (deleted) | ins (inserted) |
small | mark (highlight)
H2O (sub) and x2 (sup) | HTML (abbr) | dfn – definition | cite – title of a work
q – short inline quotation
|
(time) |
data – value 123
blockquote – a longer block quotation.
pre – preformatted text preserves whitespace and indentation
code – code snippet | Ctrl+C
(kbd)
| samp – program output | var – variable
ruby: 漢字 (characters with rt annotation and rp: 漢)
bdo: Right-to-left text | bdi: العربية (direction isolation)
long word with optional break:
supercalifragi
John Smith, 1 Test Street, 00-001 Warsaw
Text color: font (obsolete, shown intentionally).
Lists
ul – bulleted list:
- item 1
-
item 2
- nested
ol – numbered list (start=5, reversed, type=A):
- item with forced value 3
- item
- item
dl – description list:
- HTML
- markup language
- CSS
- style sheets
Links and anchors
a – external link (new tab) | a – anchor link | mailto: | tel: | download
Tables
| th 1 | th 2 | th 3 |
|---|---|---|
| td | td with colspan=2 | |
| td rowspan=2 | td | td |
| td | td | |
| tfoot – table footer | ||
Media and embedded content
| with (track)
(embed) |
Forms – all input types
Interactive elements
summary – click to expand details
Hidden content inside details. details open – expanded by default:
Expanded right away
Visible content.
Other tags
template – invisible template: content from template
slot (Web Components):