The <label> tag defines a label (tag) for an input element. The label element does not present any special effect to the user. However, it improves usability for mouse users. This control is triggered if you click on the text within the label element. That is, when the user selects the tag, the browser automatically shifts the focus to the form control associated with the tag. The for attribute of the <label> tag should be the same as the id attribute of the associated element Example 1: Copy code The code is as follows:<label for="man"> <input type="radio" value="男" name="man" id="man"/> male </label> <label for="man2"> <input type="radio" value="女" name="man" id="man2"/> female </label> Example 2: Copy code The code is as follows:<input type="checkbox" name="Pages" value="Job" id="Job" ><label for="Job">Add and edit job information</label> <input type="checkbox" name="Pages" value="JobQuery" id="JobQuery" ><label for="JobQuery">Query and delete recruitment information</label> <input type="checkbox" name="Pages" value="Technology" id="Technology" checked><label for="Technology">Add or modify technology items</label> |
<<: Sample code for using CSS to write a textured gradient background image
>>: MYSQL METADATA LOCK (MDL LOCK) theory and lock type test
Today someone talked to me about a website develo...
1. Find mysqldump.exe in the MySQL installation p...
Table of contents linux 1. What is SWAP 2. What d...
DML operations refer to operations on table recor...
Previously, I introduced several ways to achieve ...
Set the table's style="table-layout:fixed...
1. Introduction By enabling the slow query log, M...
1. Install and start nginx # Install nginx sudo a...
I recently used Dreamweaver to make a product pres...
Table of contents Development Environment Game en...
This article uses examples to explain the princip...
The following code introduces Chrome's monito...
Currently I have made a project, the interface is ...
Checkboxes are very common on web pages. Whether ...