Home > Web Front-end > Front-end Q&A > How to use html form tag

How to use html form tag

青灯夜游
Release: 2019-05-27 11:10:33
Original
3540 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template