Skip to content

Semantic HTML

Semantic HTML uses elements according to their meaning. A real button has properties that a styled text block does not acquire automatically.

Design & UX

Use elements for their intended purpose

Semantic HTML describes content and controls using appropriate HTML elements. Headings structure content, a link leads to a destination and a button performs an action. This gives browsers and assistive technologies information about the interface's meaning.

To save an address in an example portal, a button is appropriate. A visually identical div block does not automatically have that meaning or the usual keyboard behaviour. An a element with a suitable href is appropriate for navigating to the address list.

CSS controls presentation; making text visually large does not turn it into a heading. Semantic HTML is an important foundation, but alone it does not guarantee a fully accessible application. Labels, states and actual behaviour must also be appropriate.

Sources

Articles on this topic

Design & UX with ASES

User experience, interfaces and brand presence