Home > Web Front-end > HTML Tutorial > Detailed introduction to HTML CSS FORM

Detailed introduction to HTML CSS FORM

高洛峰
Release: 2017-03-27 09:55:47
Original
1817 people have browsed it

Forms are often used to collect input from different types of users, allowing users to collect: text fields (text), drop-down lists (select), radio buttons (radio), check boxes (checkbox) and action buttons (Action)

Form tag

HTML CSS之FORM的详细介绍

Most form tags are input tags, and the input type is defined by (type).

example: & lt; form & gt;

# & lt; input Type = "Text" name = "first_text" & gt;

## & ltpe = 'Text' name="address" value="Guangdong"> When a default value is required, use the value attribute


                                                                                                                                                                                                                                                                     

                                                                                                                                                                                "checkbox" name="Tiger">

                                                                                                                                                                                                                     ​ Select

The elements used in the drop-down list are: select The attribute is: option

Example:

Measurements:

Button Three attributes of the button

submit This button is a submit button (except for Internet Explorer, this value is the default value of other browsers).

button This button is a clickable button (the default for Internet Explorer).

reset This button is a reset button (clear form data).

<form action="form_action.asp" method="get">
  First name: <input type="text" name="fname" />
  Last name: <input type="text" name="lname" />
  
  <button type="submit" value="Submit">Submit</button>
  <button type="reset" value="Reset">Reset</button>
</form>
Copy after login

The above is the detailed content of Detailed introduction to HTML CSS FORM. 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