Home / Learn HTML / HTML Accessibility
HTML Accessibility
Accessible pages work for everyone: people who use screen readers, keyboards, voice or large text.
Definition
Accessibility (a11y) means that everyone can use your page, including people who are blind, deaf, colour blind, cannot use a mouse or use slow connections. It is also good for SEO, and in many countries it is the law.
- Use semantic elements and real headings.
- Give every image an
altand every control alabel. - Make everything usable by keyboard and keep a visible focus outline.
- Keep good colour contrast (at least 4.5 to 1 for text).
- ARIA attributes (
aria-label,role) fill gaps, but a native element is always better.
Theory in plain words
What it is
Accessibility means making pages usable for everyone, including people who use screen readers, keyboards or zoom.
Why we use it
About one in six people live with a disability. Accessible pages also rank better and are required by law in many places.
How it works
Use semantic elements, alt text, labels and good contrast. Browsers build an accessibility tree that assistive technology reads.
Where it is used
- Public and government sites
- Shops and banks
- Every website
Empty alt tells screen readers to skip it.
A real button works with keyboard and screen readers automatically.
Press Tab once to reveal the link. It helps keyboard users skip the menu.
- Test with only the keyboard: Tab, Shift+Tab, Enter, Space.
- Do not rely on colour alone to show meaning.
- Make click targets at least 44 by 44 pixels.
- Add captions to videos.
- Do not auto play loud sound.
Quick quiz
1. Which makes a button work with keyboard automatically?
Native elements are accessible.
2. Decorative images get
Empty alt skips it for screen readers.
3. Good contrast means
Low contrast hurts readers.