Form
1. Syntax
<form method= "Get|post" action= "where data is submitted" >
Form content
</form>
2.input Label Common Properties
<input name= "label name" type= "label type" value= "label default"/>
Size: Width of text box
MaxLength: Enter the length of the character of the text box
Checked: Default selection for radio boxes and check boxes
Selected: Default selection for drop-down box
3. Common label types
Text//textbox
password//Password Box
Radio//radio button
checkbox//check box
Button//Buttons
Submit//Commit button
Reset/Reset button
URL//Only enter URL
Email//Can only enter the mailbox
Number//can only enter numbers
File//Files field
Range//Slider
Search//Searching box
Other labels
<select>: drop-down box
<option></option> Options
</select>
<textarea></textarea> text fields
Note: The name attribute values in the radio and checkbox need to be consistent in order to achieve the effect of single or multiple selection.
4. Advanced application of the form
Hidden//hidden fields
ReadOnly//Read-only
Disabled//disable
5. Labeling of form elements
Cases:
<label for= "id value" > Male </label>
<input type= "Radio" id= "id value"/>
6. Method of primary validation of forms
Placeholder//Tips
Required//Required fields
Pattern//Regular expression (input content must conform to the requirements of this expression)
HTML Editing Notes 3