Interview Question

What is a label tag?

`<label>` should be used for its proper HTML purpose.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

`<label>` is text that names a form control. • Connecting a label to an input helps everyone understand and click it. • Browsers apply the native parsing and behavior defined for this element. • Using its native meaning helps assistive technology understand the content when the element has accessibility semantics.

💡 Simple Example

<label for="email">Email</label><input id="email">

⚡ Quick Revision

`<label>` should be used for its proper HTML purpose.