Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Grouping with <fieldset> and <legend> | Organizing and Structuring Form Controls
HTML Forms Foundations

bookGrouping with <fieldset> and <legend>

When you design forms with multiple related fields, using the fieldset element helps you group these fields together in a way that is clear for everyone. The legend element provides a descriptive heading for the group, making it easier for users to understand the form's structure. This approach is especially important for accessibility: screen readers will announce the group and its legend, giving users important context about the information being requested.

index.html

index.html

style.css

style.css

copy

By grouping related fields, you make forms easier to scan for sighted users, who can quickly identify logical sections. For users of assistive technologies, the grouping and legend are announced, improving navigation and comprehension throughout the form.

question mark

Which statements accurately describe the benefits of using fieldset and legend elements in web forms?

Select the correct answer

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 3

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you show me an example of how to use `fieldset` and `legend` in a form?

Why is accessibility important when designing forms?

Are there other HTML elements that help with form accessibility?

Awesome!

Completion rate improved to 10

bookGrouping with <fieldset> and <legend>

Pyyhkäise näyttääksesi valikon

When you design forms with multiple related fields, using the fieldset element helps you group these fields together in a way that is clear for everyone. The legend element provides a descriptive heading for the group, making it easier for users to understand the form's structure. This approach is especially important for accessibility: screen readers will announce the group and its legend, giving users important context about the information being requested.

index.html

index.html

style.css

style.css

copy

By grouping related fields, you make forms easier to scan for sighted users, who can quickly identify logical sections. For users of assistive technologies, the grouping and legend are announced, improving navigation and comprehension throughout the form.

question mark

Which statements accurately describe the benefits of using fieldset and legend elements in web forms?

Select the correct answer

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 3
some-alt