라벨 태그를 span 또는 dev보다 형식으로 사용해야하는 경우?html 형식의 span/dev 태그에 label 태그를 사용해야하는 경우?
예 :
옵션 1 스팬 :
<form action="">
<span>Name:</span><input type="text">
<input type="submit" />
</form>
옵션 2 라벨 :
<form action="">
<label>Name:</label><input type="text">
<input type="submit" />
</form>
옵션 3-DIV :
<form action="">
<label for="txt">Name:</label><input type="text" id="txt" name="txt" />
<input type="submit" />
</form>
그런 다음 입력 요소에 초점을 맞출 것이다 라벨 클릭 :
<form action="">
<div style="display:inline;">Name:</div><input type="text">
<input type="submit" />
</form>
감사