Common HTML Elements

Examples of common HTML elements and their semantic usage.

Headings & Paragraphs

Heading Level 1

Heading Level 2

Heading Level 3

Heading Level 4

Heading Level 5
Heading Level 6

This is a regular paragraph with some bold and emphasized text.

Here's another paragraph with highlighted text and small text.

This paragraph contains inline code and keyboard shortcuts.

You can also have superscript and subscript text.

Lists

Unordered List

  • First item
  • Second item
  • Third item with nested list:
    • Nested item 1
    • Nested item 2

Ordered List

  1. First ordered item
  2. Second ordered item
  3. Third ordered item

Definition List

Term 1
Definition of term 1
Term 2
Definition of term 2

Links & Buttons

Here's a regular link.

Unvisited linkVisited link

Tables

Column 1Column 2Column 3
Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3
Row 2, Cell 1Row 2, Cell 2Row 2, Cell 3

Blockquotes & Citations

This is a blockquote with some quoted text.

It can contain multiple paragraphs.

— Author Name

Code Blocks

function helloWorld() {
    console.log('Hello, World!');
}

helloWorld();

Horizontal Rules

Content above the rule.


Content below the rule.

Details & Summary

Click to expand

This content is hidden by default and can be revealed by clicking the summary.