Table of Contents
html5 form form
Control label:
input tag
Copy after login
" >
Copy after login
Smartly select one radio button box with the same name
Multiple check boxes can select multiple
Ordinary buttons can use js to add functions according to requirements
The drop-down box label is a bit special. It is not an attribute of the input but a separate label
Home Web Front-end Front-end Q&A What is the tag that defines the form in html5

What is the tag that defines the form in html5

Jul 26, 2022 pm 04:26 PM
html5 form tag form

html5The tag defining the form is "

". The form tag is used to create an HTML form (form field) for user input to collect and transfer user information. All content in the form will be submitted to the server; the syntax "
form control
". A form can contain one or more form elements, such as input, select, and textarea.

What is the tag that defines the form in html5

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

html5The tag defining the form is "

".

html5 form form

The form tag is used to create an HTML form (form field) for user input to realize the collection and delivery of user information. form All content in will be submitted to the server.

The form form field can contain various interactive controls - control labels (text fields, check boxes, radio boxes, submit buttons, etc.), such as , , < ; select>, and other tags.

Label syntax format

    <form action="提交地址" method="提交方式" name="表单名称">
        各种表单控件
    </form>
Copy after login

Four commonly used method submission methods:

get    		一般用来查询信息
post		一般用来新增信息
put      	一般用来修改信息
delete		一般用来删除信息
Copy after login

Control label:

input tag

  • The meaning of input is
  • <input />The tag is Single tag
  • The type attribute sets different attribute values ​​to specify different control types
  • In addition to the type attribute, there are other attributes

type="text" is a normal input box and value is the value inside. Name and id will be used when writing js.

    <form action="url地址" method="提交方式" name="表单名称">
        <input type="text" name="" id="" value="你好">
    </form>
Copy after login

What is the tag that defines the form in html5

Some attributes of the input tag:

The checked attribute is only available for radio buttons and check boxes

##typeTextSingle line text input boxPasswordPassword input boxRadioRadio ButtonText fieldnamevaluesizecheckedMaxlengthPassword box
AttributeAttribute valueDescription



##Checkbox
Checkbox

Button
Normal button

Submit
Submit button

Reset
Reset button

Image
Submit button in image form
##File
The name of the space
Default text value in the input control
The input control is in Display width in the page
Define the default selected items in the selection space
The maximum number of characters allowed to be entered by the control

<input type="password" name="" id="" value="">
Copy after login

What is the tag that defines the form in html5Radio button box

Smartly select one radio button box with the same name

        男 <input type="radio" name="gender" id="" value=""> 
        女 <input type="radio" name="gender" id="" value="">
Copy after login

What is the tag that defines the form in html5Check box

Multiple check boxes can select multiple

        爱好: <br> 
        抽烟<input type="checkbox" name="hobby" id="" value=""> 
        喝酒<input type="checkbox" name="hobby" id="" value=""> 
        烫头<input type="checkbox" name="hobby" id="" value="">
Copy after login

Button

Ordinary buttons can use js to add functions according to requirements

The submit button will submit the entered form information to the action address of the form

The reset button will reset the form information to the default

    <form action="url地址" method="提交方式" name="表单名称">
        <input type="button" name="" id="" value="我是一个普通按钮">
        <input type="submit" name="" id="" value="我是一个提交按钮">
        <input type="reset" name="" id="" value="我是一个重置按钮">
    </form>
Copy after login

##Drop-down box labelWhat is the tag that defines the form in html5

The drop-down box label is a bit special. It is not an attribute of the input but a separate label

        <select name="省市区" id="">
            <option value="">山东</option>
            <option value="">北京</option>
            <option value="">江苏</option>
            <option value="">深圳</option>
            <option value="">上海</option>
        </select>
Copy after login

##Related recommendations: "

html video tutorial

What is the tag that defines the form in html5

The above is the detailed content of What is the tag that defines the form in html5. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

See all articles