Exam Practice Table
The following table identifies common errors in semantic HTML and accessibility, specifically focused on the requirements for Lab 01.
| UI Element / Issue | Wrong HTML (with mistake) | Correct UI Element | Correct HTML |
|---|---|---|---|
Two h1 tags on a single page |
|
One h1 for the page title; h2 for main sections. |
|
Missing alt attribute on images |
|
Informative images must have descriptive alt text. |
|
| Improper Heading Hierarchy (Reversed) |
|
Headings must follow a logical numerical order. |
|
Using div instead of Semantic Tags |
|
Use <nav> for menus and <main> for primary content. |
|
| Vague Link Text |
|
Link text must describe the destination when read out of context. |
|
Missing scope in Table Headers |
|
<th> requires scope="col" or scope="row". |
|
| Broken Form Association |
|
Labels must use the for attribute to match the input id. |
|
Missing nav structure |
|
Navigation links should be structured as a list (ul > li). |
|