APIs

htmlFor

Associates a label with the control whose id matches the value. Keep IDs unique.

Formal Syntax & Structure

react syntaxreact
htmlFor

Working Example

Example Snippetreact
<><label htmlFor="title">Title</label><input id="title" /></>
React Reference