我正在制作一个具有多个输入框的表单,其中需要在输入框内部提供表单元素的标签,我正在这样使用:
一个例子
<form class="TTWForm">
<input type="email" name="email" required="required" placeholder="Email Address">
</form>
上面的代码在HTML5的W3C验证器中是有效的。
在HTML5中,label
不再是必需的吗?
如果我在使用HTML5的placeholder
在input
中显示标签,这样做可以吗?
为了使屏幕阅读器兼容,是否仍然需要使用label
和placeholder
一起使用?