Start with the role

A heading introduces a section. A list groups related items. A link leads to a destination. Choosing elements for those purposes communicates more than choosing whatever looks convenient. Visual styling can change, while the underlying role remains available to browsers and assistive technology.

Separate meaning from appearance

Large, bold text does not automatically become a heading. Equally, a heading does not stop being a heading when its font becomes smaller. This separation lets a document keep its organization across screen sizes, reading modes and different ways of navigating. Semantic markup supports accessibility, although it cannot guarantee an accessible experience by itself.

Read the outline

Hypothetical example: a public notice contains a title, an explanation and three preparation steps. Marking those steps as an ordered list communicates their sequence. Giving the explanation a descriptive heading helps a reader find it again. The useful question is whether the document still makes sense when its visual styling is removed.

<h2>Before you begin</h2>
<ol>
  <li>Read the notice.</li>
  <li>Gather the required details.</li>
</ol>
Illustrative markup: the list expresses a sequence, independently of its appearance.

Further reading: MDN: semantics.