Issue
I saw the code below, in one of my studying codes:
<form>
<label for="firstName">First Name:(click here cause cursor go inside the input box)</label>
<input id="firstName" type="text">
</form>
I find that the pair of for
and id
attributes connect the label and input element in the way that the cursor goes inside the input box automatically by clicking on label.
Which other pair of HTML elements can be connected to each other by the for
and id
attributes set? If it works for many other HTML elements, is there any list or source of the default action occurred by connecting one of them in each pair element?
Solution
According to w3school, we can use for
with <label>
and <output>
element. Here is the link.
Answered By - Abhijeet Singh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.