label element



Label element is used to create label within a form. The label acts as the "option".
<form> <label>Text</label> <input type="Value" name="Text" id="Text"> </form>
Element Specific attributes supported by this element are:
for element_id Mentions about the label related to from input.
form form_id Indicates the forms, to which the label belongs to.

Example Code:

Result :

Would you like to login?
  • Click and select the available options.
  • It must be enclosed by the <form> and <Input>.
It is available in previous versions of HTML5.
It supports both Global Attributes and Event Attributes in HTML5.


It is applicable to all major browsers.

Ask Questions

Ask Question