no.*_*no. 2 forms markup html5 input
我对HTML5输入字段的有效标记有点困惑.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Site Name</title>
</head>
<body>
<form name="contact" method="post" action="/">
<p><input type="input" name="first_name" maxlength="255" /></p>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当我通过w3.org上的验证器运行时,我得到错误Bad value input for attribute type on element input.
,/>
突出显示为红色.我看一下它创建的HTML-Tidy版本,它告诉我这样写它:
<p><input type="input" name="first_name" maxlength="255"></p>
Run Code Online (Sandbox Code Playgroud)
但是当我验证我然后得到相同的错误,但只有>
突出显示为红色.然后查看HTML-Tidy以查看它已经纠正了它并且它离开的情况就像它可以正常一样,但错误仍然存在.这被认为是有效的HTML5标记吗?或者有一种特定的方法吗?
归档时间: |
|
查看次数: |
9769 次 |
最近记录: |