HTML5 id attribute and html5id attribute
HTML5 id attributes:
This attribute specifies the unique identifier of an HTML element, which must be unique in an HTML document.
Syntax structure:
<element id="id">
Browser support:
(1). IE browser supports this attribute.
(2) Google Chrome supports this attribute.
(3) Firefox supports this attribute.
(4). Safari supports this attribute.
(5) operabrowser supports this attribute.
Differences between HTML4.01 and html5:
(1) In HTML5, the id attribute can be used for any HTML element (it will verify any HTML element. But not necessarily useful ).
(2 ). in HTML4.01, the id attribute cannot be used for: <base >,< head >,< html >,< meta >,< param >,< script >,< style>, and <title>.
Property value:
Value |
Description |
Id |
The unique id of the specified element. Naming rules: (1). must begin with a letter A-Z or a-z. (2 ). the following characters: letters (A-Za-z), numbers (0-9), hyphens (-"), underscores (_"), colons (": ") and period (". ") (3). The value is case sensitive. |
Code example:
<! DOCTYPE html>
Original address: http://www.51texiao.cn/HTML5jiaocheng/2015/0618/4615.html
The most original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 10033.