Home  >  Article  >  Web Front-end  >  How to use html form tag

How to use html form tag

青灯夜游
青灯夜游Original
2019-05-27 11:10:333525browse

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.

How to use html form tag

#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:

How to use html form tag

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn