The role of role in html

高洛峰
Release: 2016-11-21 13:25:11
Original
2369 people have browsed it

role is to enhance semantics. When existing HTML tags cannot fully express semantics, you can use role to explain.

Usually this happens with some customized components, which can enhance the accessibility, usability and interactivity of the components.

role is used to describe the actual function of a non-standard tag. For example, if you use a div as a button, then set the role="button" of the div, and the auxiliary tool can recognize that it is actually a button


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!