Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML 全局属性


HTML 全局属性

全局属性是可以用于所有 HTML 元素的属性。

属性 描述
accesskey 指定一个快捷键来激活/聚焦元素
class 为元素指定一个或多个类名(引用样式表中的类)
contenteditable 指定元素的内容是否可编辑
data-* 用于存储特定于页面或应用程序的自定义数据
dir 指定元素内容的文字方向
draggable 指定元素是否可拖动
enterkeyhint 指定虚拟键盘上回车键的文字
hidden 指定元素尚未或不再相关
id 指定元素的唯一 ID
inert 指定浏览器应该忽略此部分
inputmode 指定虚拟键盘的模式
lang 指定元素内容的语言
popover 指定一个弹出窗口元素
spellcheck 指定是否对元素进行拼写和语法检查
style 为元素指定内联 CSS 样式
tabindex 指定元素的 Tab 键顺序
title 指定有关元素的额外信息
translate 指定元素的内容是否应该被翻译

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.