Home  >  Article  >  Web Front-end  >  How to use html to create a concise submission form (detailed code explanation)

How to use html to create a concise submission form (detailed code explanation)

奋力向前
奋力向前Original
2021-08-02 16:45:029068browse

In the previous article "Newbie: How to use the a tag to create a link (share)", I introduced how to use the A tag to create a link. The following article will introduce to you how to use HTML to create a form. Let's see how to do it together. Friends in need can refer to it. I hope it will be helpful to you.

How to use html to create a concise submission form (detailed code explanation)

htmlHow to make a form

Common functions such as "login" and "registration" in web pages are usually implemented using forms. For example, below is an example of a login form, which uses &lt;input&gt; and <button></button>

code example

<HTML>
	<form>
	<input placeholder="用户口"><br>
	<input placeholder="密码" type="password"><br>
	<button type="submit">登录</button>
	<button type="reset">重置</button>
	</form>
</HTML>

Code rendering

How to use html to create a concise submission form (detailed code explanation)

##

Shell of the form: Lets the user submit a set of data, usually in conjunction with other elements.


Tags are empty tags: Use
to enter empty lines instead of dividing paragraphs.

&lt;input&gt; Single-line text input box: The element usually specifies user input, simply &lt;input&gt;Enter in a single line.

&lt;input&gt;

code to mark a button with other elements or JavaScript

<button type="button">...</button>

Placeholder characters: When the input box is empty, some guidance content can be displayed inside to let the user know how to input

input placeholder="用户口"

Recommended learning:

Html video tutorial

The above is the detailed content of How to use html to create a concise submission form (detailed code explanation). 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