References

Collection of references for web development.

HTML for attribute

Description

Specifies the ID of the element that the label element is related to.

Values

Value
ID

Example

<form>
	<label for="age">Your age?</label>
	<input type="text" id="age" name="age">
</form>

Example #2

<form>
	<label for="rememberme">Remember Me?</label>
	<input type="checkbox" id="rememberme">
</form>