문제

My question in short is the <label> tag, is it work for XHTML 1.0 Transitional validation ?

For example

<form action="login.php" method="post">
    <label>Username:</label> <input type="text" name="username" id="username" /><br />
    <label>Password:</label> <input type="password" name="password" id="password" /><br/>
    <input type="submit" name="sbmtLogin" value="login" />
</form>
도움이 되었습니까?

해결책

<label> (and validating would have told you this) is but <lable> (which you had before editing) is not.

It is, however, useless unless you associate it with a form control (via the for attribute or placing the form control as a descendant of the label element).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top