In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what does id refer to in html". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what does id mean in html"?
In html, id is an abbreviation for "Identity document", meaning "identity number". This attribute is used to specify the unique id of an element, which can be used as a link anchor to change or add styles to an element with a specified id through JavaScript or through CSS.
The operating environment of this tutorial: windows10 system, HTML5 version, Dell G3 computer.
What does id mean in html
The id attribute specifies the unique id of the HTML element.
Id must be unique in the HTML document.
The id attribute can be used as a link anchor (link anchor) to change or add styles to elements with a specified id through JavaScript (HTML DOM) or through CSS.
Differences between HTML 4.01 and HTML5
In HTML5, the id attribute can be used for any HTML element (it validates any HTML element. But it doesn't have to work.
In HTML 4.01, the id attribute cannot be used for:, and.
Note: HTML 4.01 has strict restrictions on the value of id (for example, id values cannot start with a number in HTML 4.01).
Grammar
Attribute value
Id specifies the unique id of the element.
Naming rules:
Must start with the letter Amurz or amurz
Followed by characters: letters (A-Za-z), numbers (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")
Value is case sensitive
Examples are as follows:
123 function displayResult () {document.getElementById ("myHeader") [xss_clean] = "Have a nice day!";} Hello World!
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: 0
*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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.