Search notes:

HTML element: label

A <label> is connected to an <input> via its for attribute. Mouse clicking on the label «activates» the connected input-field.
There is also a title attribute that becomes active when the mouse hovers over the label.
<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>&lt;label&gt;</title>
</head>
<body>

  A <i>label</i> is connected to an <i>input</i> via its <i>for</i> attribute. Mouse clicking
  on the label «activates» the connected input-field.<p>

  There is also a <i>title</i> attribute that becomes active when the mouse hovers over the label<p>


  <form action="#">

     <label for="value_01" title="Title seen with mouse over label">Label 01</label> <input type="text"     id="value_01"><br>
     <label for="value_02" title="Title seen with mouse over label">Label 02</label> <input type="checkbox" id="value_02">

  </form>


  <p>See also <a href="form.html">form.html</a>

</body>
</html>

Github repository about-html, path: /tags/label.html
See result on htmlpreview.github.io

See also

HTML elements

Index