Accessibility means everyone — including people who use screen readers or only a keyboard — can use your site. It also helps SEO.
Easy rules that make a big difference
- Give every meaningful image an
alttext. Usealt=""for decorative images. - Connect every form field to a
<label>. - Use headings in order (
h1→h2→h3), not just for big text. - Write clear link text ("Download the syllabus", not "click here").
- Keep good colour contrast between text and background.
- Add the
langattribute to<html>.
Example
Example — Accessible image, link and form
HTML
<img src="https://www.w3schools.com/html/pic_trulli.jpg" width="200"
alt="White stone houses with cone-shaped roofs">
<p><a href="/syllabus.pdf">Download the PHP course syllabus (PDF)</a></p>
<form>
<label for="email">Email address</label>
<input id="email" type="email" name="email">
<button type="submit">Subscribe</button>
</form>