# The \<label\> element

**URL:** <https://discourse.mozilla.org/t/the-label-element/87670>\
**Category:** Learn\
**Created:** [October 24, 2021, 7:22pm UTC](https://discourse.mozilla.org/t/the-label-element/87670 "2021-10-24T19:22:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisM](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/denism/32/51393_2.png) [@DenisM](https://discourse.mozilla.org/u/DenisM)\
**Post date:** [October 24, 2021, 7:22pm UTC](https://discourse.mozilla.org/t/the-label-element/87670/1 "2021-10-24T19:22:30Z")

</div>

Hello Michael and hello everyone,

I haven’t been there for a while, now I’m reading the **How to structure a web form** article, and in [The `<label>` element](https://developer.mozilla.org/en-US/docs/Learn/Forms/How_to_structure_a_web_form#the_label_element) part is a paragraph telling that

> There is another way to associate a form control with a label — nest the form control within the `<label>` , implicitly associating it.

And below is a screenshot, where seems to me is a mistake? When we wrap up the input in such a way, we should omit the `for` attribute?

 ![ice_screenshot_20211024-210222](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/3/1/31859d172b201ccd2a1ad9ed751954da2721693d.png)  
Kind regards,  
Denis

---

<div class="post-metadata">

**Author:** ![DenisM](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/denism/32/51393_2.png) [@DenisM](https://discourse.mozilla.org/u/DenisM)\
**Post date:** [October 24, 2021, 7:29pm UTC](https://discourse.mozilla.org/t/the-label-element/87670/2 "2021-10-24T19:29:49Z")

</div>

A have already understood what is the point, when we wrap up in a such a way, this attribute is strongly recommended for being used but not obliged because of accessibility reason

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [October 24, 2021, 8:32pm UTC](https://discourse.mozilla.org/t/the-label-element/87670/3 "2021-10-24T20:32:35Z")

</div>

Hi @DenisM

Yes you are right.

In the great article [HTML Inputs and Labels: A Love Story](https://css-tricks.com/html-inputs-and-labels-a-love-story) Amber Wilson even generally recommends explicit labels (not nested) over implicit labels (nested):

> Unfortunately, an implicit label is not handled correctly by all assistive technologies, even if `for` and `id` attributes are used. **Therefore, it is always the best idea to**  **use an explicit label instead of an implicit label.**

Have a nice day!  
Michael
