"."/> ".">

Home  >  Article  >  Web Front-end  >  What does text mean in html5

What does text mean in html5

WBOY
WBOYOriginal
2021-12-31 11:06:368161browse

In HTML5, text means "text field". The text attribute value is the default attribute of type. When the text attribute value is used in conjunction with the type attribute, you can set the type of the specified element to define a text field. The syntax is "".

What does text mean in html5

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

What does text mean in html5

The type attribute specifies the type of element to be displayed. The default type is: text.

The default text represents:

Define a single-line text field (default width is 20 characters).

The syntax is as follows:

<元素 type="text">

The example is as follows:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>123</title> 
</head>
<body>
<form action="demo-form.php">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit">
</form>
<p>点击提交按钮提交表单。</p>
</body>
</html>

Output result:

What does text mean in html5

Recommended tutorial: "html video tutorial"

The above is the detailed content of What does text mean in html5. 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