Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common global properties of HTML5

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what the common global properties of HTML5 are, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The global attribute of HTML5, which is an attribute that all elements can share. For example:

ContentEditable attribute: refers to whether the content of the current element can be edited on the page, when contentEditable = "true", can be edited, contentEditable = "false" is not editable, the default is false. In the past, when we wanted to edit an element, we could only use controls such as text boxes or text fields. Now, we can use the contentEditable attribute of HTML5 to edit the content of any element, which is very convenient.

Code example:

[code]

HTML5 Star Sky 1

HTML5 Star 2

HTML5 Star 3

[/ code]

DesignMode property: also a Boolean value that indicates whether the current entire page document can be edited. If you set document.designMode= "on", the entire page can be edited.

Hidden attribute: also a Boolean value, hidden= "true", the element is displayed on the page, and the hidden= "false" is hidden and not displayed.

Spellcheck attribute: also a Boolean value, which refers to whether to spell check the content entered by the current user, mainly for the input and textarea text boxes. If spellcheck= "true", then turn on spell checking for the current text box, and turn off spell check for spellcheck= "false".

Code example:

[code]

[/ code]

Tabindex attribute: the order in which the tab key of the element corresponds. The tabindex global attribute allows us to press the tab key to access any element in the page, while in traditional web pages, we can only use the tab key to locate the element through the form.

The above is all the content of the article "what are the common global properties of HTML5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 296

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report