form content". The form tag is used to transmit data to the server and contains elements such as input and label."/> form content". The form tag is used to transmit data to the server and contains elements such as input and label.">

Home >Web Front-end >Front-end Q&A >What is the usage of form in css

What is the usage of form in css

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-05-14 17:42:584702browse

In CSS, the form tag is used to create an HTML form for user input. The syntax format is "

Form content
" . The form tag is used to transmit data to the server and contains elements such as input and label.

What is the usage of form in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Definition

The

tag is used to create HTML forms for user input.

Forms can contain input elements, such as text fields, check boxes, radio buttons, submit buttons, etc.

The form can also contain menu, textarea, fieldset, legend and label elements.

Forms are used to transmit data to the server.

Syntax

<form method="传送方式"action="服务器文件">表单内容</form>

Tips and Notes

Note: The form element is a block-level element, and line breaks will occur before and after it. .

Attribute

What is the usage of form in css

##Description

enctype attribute may Value:

  • application/x-www-form-urlencod

  • edmultipart/form-data

  • text/plain

Explanation

1.
appears in pairs, starting with
End with
, and the form must be placed between it.

2. Method transmission method, get/post is an issue that back-end programmers consider

3. Action The place where the data entered by the viewer is transmitted, such as a php page, (save .php)


Example

<!DOCTYPE html>
<html>
<body>

<form action="/demo/demo_form.asp">
姓:<br>
<input type="text" name="姓" value="张">
<br>
名:<br>
<input type="text" name="名" value="嘉元">
<br><br>
<input type="submit" value="Submit">
</form> 

<p>如果您点击提交,表单数据会被发送到名为 demo_form.asp 的页面。</p>

</body>
</html>

What is the usage of form in css

Recommended learning:

css video tutorial

The above is the detailed content of What is the usage of form in css. 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