FrontendDeveloper.in

HTML question detail

What is the purpose of the `label` element in forms?

label ties readable text to an input field and improves click targets and screen-reader context.

Best practice:

<label for="email">Email</label> <input id="email" name="email" type="email" />
Back to all HTML questions
Get LinkedIn Premium at Rs 399