[HTML] <label> tag
필그램
·2018. 1. 25. 00:34
The <label>
tag allows you to click on the label, and it will be treated like clicking on the associated input element. There are two ways to create this association:
First, you can wrap the label element around the input element:
<label>Input here:
<input type='text' name='theinput' id='theinput'>
</label>
The other way is to use the for
attribute, giving it the ID of the associated input:
<label for="theinput">Input here:</label>
<input type='text' name='whatever' id='theinput'>
This is especially useful for use with checkboxes and buttons, since it means you can check the box by clicking on the associated text instead of having to hit the box itself.
Read more about this element in MDN.
반응형
'프로그래밍' 카테고리의 다른 글
Axure (아슈르) 강좌 2 for UX (0) | 2019.06.17 |
---|---|
Axure - Master 사용하기 (0) | 2019.06.17 |
[UX] 프로토타입 제작을 위한 Sketch[스케치] 자료정리 (0) | 2018.01.02 |
클라우드 서비스 선택하기 (2017~2018) : 구글 드라이브에서 50GB 무료의 메가까지 (0) | 2017.11.25 |
Git(깃) : 명령어 정리 - 처음 그리고 추가 프로젝트 올리기 (0) | 2017.11.14 |