Playback starts YouTube’s embedded player (privacy-enhanced mode).
HTML Tutorial - The 'for' attribute on labels and input fields
ChanneldcodeDescription from the creator
When I first started learning HTML I would always incorrectly use this attribute alongside the 'name' attribute which was clearly incorrect.
Support me on Patreon:
patreon.com/dcode - with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
w3schools.com/tags/att_for.asp
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
About this tutorial
dcode published this 2:30 video tutorial on October 25, 2018. It has been watched 33,626 times on YouTube.
Share
Further reading
-
HTML Required Attribute in Select, Input, and Textarea
tutorialdeep.com
The HTML required attribute can be used to specify whether the element must be filled out or not before submitting the form. It is a boolean attribute that requires boolean values like true and false. Example: Form with…
-
HTML Input Attributes - W3Schools Online Web Tutorials
w3schools.com
The step Attribute. The input step attribute specifies the legal number intervals for an input field.. Example: if step="3", legal numbers could be -3, 0, 3, 6, etc. Tip: This attribute can be used together with the max…
-
HTML label tag - W3Schools Online Web Tutorials
w3schools.com
Tips and Notes. Tip: The for attribute of <label> must be equal to the id attribute of the related element to bind them together. A label can also be bound to an element by placing the element inside the <label> element.
This tutorial in other languages
- FRTutoriel HTML - Le « pour » attribut sur les étiquettes et les champs d'entrée
- ESTutorial HTML - El atributo 'para' en las etiquetas y campos de entrada
- PTTutorial HTML - O atributo 'para' nos rótulos e campos de entrada
- ITEsercitazione HTML - L'attributo 'per' sulle etichette e campi di input
- DEHTML Tutorial - Das ‚for‘ Attribut auf Etiketten und Eingabefelder
- NLHTML Tutorial - Het attribuut 'voor' op het etiket en invoervelden
- RUУчебник HTML - атрибут «для» на этикетках и полей ввода
- PLKurs HTML - The „dla” atrybut na etykietach i pól wejściowych
- JAHTMLチュートリアル - ラベルと入力フィールド上の「の」属性
- ARHTML دروس - سمة 'ل' على التسميات وحقول الإدخال
- HIHTML ट्यूटोरियल - लेबल और इनपुट फ़ील्ड पर 'के लिए' विशेषता
- IDHTML Tutorial - The 'untuk' atribut pada label dan field input