Grokking HTML
0% completed
Grouping Form Elements
Two radio buttons labeled "Saturday morning" and "Thursday evening" mean little until the visitor knows the question they answer. In the club's form so far, that question sits in a <p> element above the buttons. A sighted visitor sees the two side by side and connects them. A screen reader user hears only "Saturday morning, radio button", because nothing in the markup ties the paragraph to the buttons.
HTML has two elements for this. The <fieldset> element wraps a group of related controls, and the <legend> element inside it holds the group's caption
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%