我不知道在檢查我的網頁在http://validator.w3.org/check錯誤是爲什麼我不斷收到此錯誤:驗證HTML:該爲標籤元素必須引用表單控件的屬性
Line 235, Column 84: The for attribute of the label element must refer to a form control.
… <label for="name" style="line-height:24px;">Your Name</label><br>
這裏是我的實際代碼
<div>
<label for="name" style="line-height:24px;">Your Name</label><br>
<input class="css_form_namefield TooltipIstok " type="text" name="name" value="" style="width: 554px;" maxlength="50" >
</div>
這是我的代碼
這個答案是錯誤的。你必須匹配id,而不是名稱。請參閱:http://www.w3.org/TR/html5/forms.html#the-label-element。下面的答案是正確的。 – mtl