Forms are an important channel for users to submit information. This section will introduce the basics of the form.
The form starts with a <form> tag. Users registering website members, voting, etc. all require forms to implement them. Of course, relying solely on XHTML is not possible to process these forms. If you want to process these tables, you need to use some web background technology similar to PHP and ASP. (By the way, the little rookie's own backstage is still very delicious at the moment.)
Let's introduce two common form components:
As you can see, both form elements use the <input> tag, but the content filled in the password box is invisible. What determines their type is the property value of the attribute type of the <input> tag. For example, text is a text box, and password is a password. You should pay attention to the <imput> tag is also an empty tag. He did not terminate the tag. We must remember to add one/ to meet the requirements of XHTML.
There are many commonly used form elements, such as single selection and choke ore, but since we cannot process forms now, we cannot understand the meaning of the form. So I won’t introduce it here. If you continue to learn backend technology in the future, you will naturally understand the role of form in website building.