Beginner 12 min

Build an accessible HTML structure

Use headings, labels, landmarks and native controls to make a page understandable.

Choose elements by meaning

Use headings for meaningful section names, navigation landmarks for navigation links, and a main element for the page’s primary content. Heading levels describe the document’s structure. Choose visual sizes separately in CSS.

How it works

Read the page as an outline before styling. A main heading describes what the page is for, and subheadings divide it into pieces. A real button communicates an available action and already supports keyboard activation.

Use native controls

A link takes the visitor to a destination. A button performs an action. Connect each input with a visible label, then step through the page using the Tab key to confirm that focus is visible and follows a logical order.

Further reading

Check your understanding

Choose an element for each user operation.

See the example and explanation
Example 1
Given Open another lesson
Answer Link
Example 2
Given Reset an animation in this lesson
Answer Button

Opening a lesson is a hyperlink. Resetting an in-page demonstration performs an action, so use a button.

Open practice problem
Next lessonDesign a responsive layout