SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
HTML
1. HTML Introduction: What is HTML? Learn with Examples 2. Best Free HTML Editors: Notepad to VS Code for Beginners 3. HTML Basic Structure: Doctype, Head, Body Explained 4. HTML Elements Explained: Tags, Content & Empty Elements 5. HTML Attributes List: href, src, alt, width, title & More 6. HTML Headings h1 to h6: Which Heading Tag to Use When 7. HTML Paragraphs: p Tag, br Line Breaks & pre Text 8. HTML Style Attribute: Colour, Font Size & Alignment 9. HTML Text Formatting Tags: bold, italic, mark & More 10. HTML Comments: How to Add Notes & Hide Code in HTML 11. HTML Colors: Names, HEX, RGB & HSL Colour Codes 12. HTML CSS: Inline, Internal & External Stylesheets 13. HTML Links: a Tag, href, New Tab & Email Links 14. HTML Images: img Tag, src, alt, Width & Formats 15. HTML Favicon: Create & Add a Browser Tab Icon 16. HTML Title Tag: How to Write a Good Page Title 17. HTML Tables: table, tr, th, td, colspan & rowspan 18. HTML Lists: ul, ol, dl & Nested Lists Explained 19. HTML Block vs Inline Elements: div, p, span Explained 20. HTML Div Tag: Group Content & Build Page Layouts 21. HTML Class Attribute: Style Many Elements at Once 22. HTML id Attribute: Unique IDs, Links, CSS & JavaScript 23. HTML Iframes: Embed YouTube, Maps & Pages in HTML 24. HTML JavaScript: script Tag, Clicks & First Example 25. HTML File Paths: Relative vs Absolute Paths Explained 26. HTML Head Element: title, meta, charset & viewport 27. HTML Layout: header, nav, main, footer Page Structure 28. HTML Responsive Design: Viewport, Images & Media Queries 29. Semantic HTML Tags: header, nav, main, article & footer 30. HTML Forms: input, label, select, checkbox & Submit 31. HTML Entities: & < > © with Examples 32. HTML Audio & Video Tags: controls, source & Fallback 33. HTML Accessibility: alt Text, Labels, Landmarks & ARIA 34. HTML Meta Tags & SEO: charset, viewport, OG Tags 35. HTML Quotations: blockquote, q, cite, abbr & address
Final Test — Certificate ₹10
Try this code live
Lesson 33 of 35

HTML Accessibility: alt Text, Labels, Landmarks & ARIA

4 min read · Free · No login needed

Accessibility means your page works for everyone — including a blind visitor who listens to the page through a screen reader, and a visitor who cannot use a mouse and navigates only with the keyboard. The good news: most of accessibility is just good HTML. If you use the right tags for the right jobs, you get most of it for free.

Diagram — see how it fits together
Infographic: accessibility checks for a web page

Alt text that actually describes

Every meaningful image needs an alt attribute that says what the image shows — because that text is what a screen reader reads aloud. "Students in the KAMALDNP computer lab" is good alt text. "image", "photo", or the file name "IMG_2041.jpg" are not — they tell the visitor nothing. If an image is purely decorative (a border, a background pattern), give it an empty alt="" so the screen reader skips it instead of announcing a useless file name.

Labels, landmarks, and keyboard focus

Every form control needs a <label> connected with for and id — without it, a screen reader cannot tell the visitor what to type. Semantic landmarks (<header>, <nav>, <main>, <footer>) let a screen reader user jump straight to the content instead of listening to the whole page. And keyboard users move with Tab and Enter — so use real <button> elements for things you click, never a <div> dressed up as a button, because a div cannot be focused or activated from the keyboard. Never remove the focus outline with CSS unless you replace it with a visible one — the outline is how keyboard users see where they are.

aria-label — only where native HTML falls short

ARIA attributes (like aria-label) add information for screen readers. But the first rule of ARIA is: do not use ARIA if plain HTML already does the job. A <button> already announces itself as a button; adding role="button" to it is redundant. Use aria-label only where HTML has no native answer — for example, an icon-only button (a magnifying-glass search button with no visible text) where aria-label="Search" tells the screen reader what the button does.

PracticeDo thisNot this
Imagesalt="Students in the computer lab"alt="image" or no alt at all
Form fields<label for="email"> on every inputPlaceholder text as the only label
Clickable thingsReal <button> and <a> tags<div> with a click handler
Page structure<header>, <nav>, <main>, <footer><div> for everything
ARIAaria-label on an icon-only buttonARIA on elements HTML already describes
Note: Placeholder text is not a label. It disappears the moment the visitor starts typing, and screen readers often do not announce it. A visible <label> stays on screen and works for everyone — use both if you like, but never placeholder alone.
Tip: Test your own page with the keyboard: put the mouse aside and press Tab through the page. If you can reach every link and button, see where the focus is, and submit the form with Enter, your page is already more accessible than most.

Common mistakes

  • Writing alt="image" — it adds noise and no information.
  • Using placeholder text as the only label on a form field.
  • Building buttons out of <div> elements that keyboard users cannot reach.
  • Removing the focus outline with CSS and giving keyboard users nothing in return.
  • Sprinkling ARIA everywhere — redundant ARIA can confuse screen readers more than no ARIA.

Example explained

  • <img src="lab.jpg" alt="Students in the KAMALDNP computer lab"> — alt text that describes the picture, so a screen reader user knows what it shows.
  • <label for="name">Your Name:</label> — a real label, so the field is announced and clickable by its text.
  • <button type="submit">Send</button> — a real button, focusable and activatable from the keyboard.
  • <button aria-label="Search">🔍</button> — an icon-only button, where aria-label is genuinely needed because there is no visible text.
  • <main> — the landmark that lets screen reader users jump straight to the content.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Accessibility</title>
</head>
<body>

<header><h1>KAMALDNP Academy</h1></header>
<nav><a href="#">Home</a> | <a href="#">Courses</a></nav>
<main>
<img src="lab.jpg" alt="Students in the KAMALDNP computer lab">
<form action="/submit.php" method="post">
<label for="name">Your Name:</label>
<input type="text" id="name" name="name">
<button type="submit">Send</button>
<button aria-label="Search">🔍</button>
</form>
</main>
<footer><p>© 2026 KAMALDNP Academy</p></footer>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Accessibility: alt Text, Labels, Landmarks & ARIA

Try it yourself — live editor

Change the code below and press Run to see the result instantly. No file to save, no login needed.

Result

Frequently asked questions

The questions learners ask most about this lesson — read the question, then open it to see the answer.

1. What does accessibility mean for a web page?

The page works for everyone, including a blind visitor using a screen reader and a visitor who navigates only with the keyboard.

2. What makes good alt text?

Text that says what the image shows, such as students in the computer lab, not just image, photo or a file name.

3. When should you use aria-label?

Only where HTML has no native answer, such as an icon-only button with no visible text, not on elements HTML already describes.

Why learn this yourself — and not just ask AI?

AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.

Get certified — just ₹10

Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test

Prefer watching? Video courses teach the same topics step by step.

Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

Website Design & Development Workshop 2026
₹299
View
WordPress Website Development Course (10 Days)
₹399
View
Summer Training in Python Programming 2026
₹3,000
View
Browse all courses
HTML — Lessons
1. HTML Introduction: What is HTML? Learn with Examples 2. Best Free HTML Editors: Notepad to VS Code for Beginners 3. HTML Basic Structure: Doctype, Head, Body Explained 4. HTML Elements Explained: Tags, Content & Empty Elements 5. HTML Attributes List: href, src, alt, width, title & More 6. HTML Headings h1 to h6: Which Heading Tag to Use When 7. HTML Paragraphs: p Tag, br Line Breaks & pre Text 8. HTML Style Attribute: Colour, Font Size & Alignment 9. HTML Text Formatting Tags: bold, italic, mark & More 10. HTML Comments: How to Add Notes & Hide Code in HTML 11. HTML Colors: Names, HEX, RGB & HSL Colour Codes 12. HTML CSS: Inline, Internal & External Stylesheets 13. HTML Links: a Tag, href, New Tab & Email Links 14. HTML Images: img Tag, src, alt, Width & Formats 15. HTML Favicon: Create & Add a Browser Tab Icon 16. HTML Title Tag: How to Write a Good Page Title 17. HTML Tables: table, tr, th, td, colspan & rowspan 18. HTML Lists: ul, ol, dl & Nested Lists Explained 19. HTML Block vs Inline Elements: div, p, span Explained 20. HTML Div Tag: Group Content & Build Page Layouts 21. HTML Class Attribute: Style Many Elements at Once 22. HTML id Attribute: Unique IDs, Links, CSS & JavaScript 23. HTML Iframes: Embed YouTube, Maps & Pages in HTML 24. HTML JavaScript: script Tag, Clicks & First Example 25. HTML File Paths: Relative vs Absolute Paths Explained 26. HTML Head Element: title, meta, charset & viewport 27. HTML Layout: header, nav, main, footer Page Structure 28. HTML Responsive Design: Viewport, Images & Media Queries 29. Semantic HTML Tags: header, nav, main, article & footer 30. HTML Forms: input, label, select, checkbox & Submit 31. HTML Entities: & < > © with Examples 32. HTML Audio & Video Tags: controls, source & Fallback 33. HTML Accessibility: alt Text, Labels, Landmarks & ARIA 34. HTML Meta Tags & SEO: charset, viewport, OG Tags 35. HTML Quotations: blockquote, q, cite, abbr & address
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →