Home > Article > Web Front-end > How to use html form tag
The
form tag is used to create an HTML form for user input. The form can be used to transmit data to the server. The form element is a block-level element, with line breaks before and after it; it can include: input, button, select, option, textarea, label and other form elements.
#html How to use form tag?
html The form tag is used to create an HTML form for user input. The form can be used to transmit data to the server.
Note: Forms can contain input elements, such as text fields, check boxes, radio buttons, submit buttons, etc. Forms can also contain button, select, option, optgroup, menu, textarea, fieldset, legend, and label elements. Forms are used to transfer data to the server.
Note: The form element is a block-level element, and lines will be broken before and after it.
html form tag example
<!DOCTYPE html> <html> <body> <form action=""> 用户名:<br> <input type="text" name="firstname" value="Mickey"> <br><br> 密码:<br> <input type="password" name="password"> <br><br> <input type="submit" value="提交"> </form> </body> </html>
Output:
The above is the detailed content of How to use html form tag. For more information, please follow other related articles on the PHP Chinese website!