Skip to content

Commit

Permalink
fix(html): add live sample to for attribute page (#31697)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar authored Jan 15, 2024
1 parent aff3a68 commit a9ee909
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions files/en-us/web/html/attributes/for/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ browser-compat:

The **`for`** attribute is an allowed attribute for {{htmlelement("label")}} and {{htmlelement("output")}}. When used on a `<label>` element it indicates the form element that this label describes. When used on an `<output>` element it allows for an explicit relationship between the elements that represent values which are used in the output.

{{EmbedInteractiveExample("pages/tabbed/attribute-for.html", "tabbed-shorter")}}

## Usage

When used as an attribute of `<label>`, the `for` attribute has a value which is the `id` of the form element it relates to.
Expand Down

0 comments on commit a9ee909

Please sign in to comment.