label 元素的 for 属性必须引用表单控件。
<label for="form-name">Your Phone <span>(required)</span></label>
<label for="form-name">Your Name <span>(required)</span></label>
我遇到错误我该如何解决这个错误?
最佳答案
您的文档中需要有一个带有此 ID 的输入元素。
例子:
<label for="email">Email:</label>
<input id="email" name="emailInput">
关于html - W3 验证 HTML 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24504795/