HTML label标签学习笔记
生活随笔
收集整理的這篇文章主要介紹了
HTML label标签学习笔记
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
網(wǎng)址:https://www.w3schools.com/tags/tag_label.asp
label能夠為下列HTML元素定義標(biāo)簽:
使用label的兩個收益:
- Screen reader users (will read out loud the label, when the user is focused on the element)
當(dāng)用戶focus在被label標(biāo)簽修飾的元素上時,Screen reader能夠讀出標(biāo)簽的文本
- Users who have difficulty clicking on very small regions (such as checkboxes) - because when a user clicks the text within the element, it toggles the input (this increases the hit area).
假設(shè)checkbox被label修飾,通常checkbox都是屏幕的狹小區(qū)域,如果用戶對點擊這種狹小區(qū)域感到困難,那么點擊label文本,能達(dá)到同樣的效果,即label的音樂,擴大了hit area的范圍。
總結(jié)
以上是生活随笔為你收集整理的HTML label标签学习笔记的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: aria-required属性学习笔记
- 下一篇: 深入学习SAP UI5框架代码系列之四: