200811 TIL
오늘의 진도
freeCodeCamp.org에서 Basic HTML and HTML5 코스 완료
이해가 잘 안 된 부분
It is considered best practice to set a for attribute on the label element, with a value that matches the value of the id attribute of the input element. This allows assistive technologies to create a linked relationship between the label and the child input element. For example:
<label for="indoor">
<input id="indoor" type="radio" name="indoor-outdoor">Indoor
</label>
아마 느낌상 label과 id간의 연결성을 명확하게 하기 위해 지정해주는 작업인 것 같긴 한데 정확한 용도는 모르겠는…? 계속 공부하다 보면 알게 되겠지
소소한 지식
HTML에서 배우는 radio button의 이름이 왜 하필 라디오인지 궁금해서 검색해봤더니 위키피디아에서 이런 구절을 발견
Radio buttons were named after the physical buttons used on older radios to select preset stations – when one of the buttons was pressed, other buttons would pop out, leaving the pressed button the only button in the “pushed in” position.
정말로 라디오 버튼에서 따왔기 때문에 라디오 버튼이라고 부르는 거였다ㅋㅋㅋㅋ