Can an identifier attribute begin with a colon?

I was looking at the source of Gmail for purely academic purposes, and I came across this.

<input id=":3f4" 
    name="attach" 
    type="checkbox" 
    value="13777be311c96bab_13777be311c96bab_0.1_-1" 
    checked="">

Miracles of miracles, most elements have identifiers starting with :
I always thought the definition of the ID attribute was like that.

IDs and NAMEs must begin with a letter ([A-Za-z]) and can be followed by any number of letters, numbers ([0-9]), hyphen ("-"), underscore ("_"), colons (":") and periods (".").

Or am I not seeing anything new? I mean, what is OK with HTML5?

+3
source share
1 answer

Admissibility

: http://www.w3.org/TR/html-markup/datatypes.html#common.data.id

:
 -
 -

:

HTML ID (, ).

HTML 4.

SO, ( HTML 4).

, , :

?

, , , CSS ( ), Sizzle ( jQuery), (, - ASP.Net ) , (, MVC).

, , HTML 5 , ( XHTML). , - , , .

, , , document.getElementById(":foo")

http://jsfiddle.net/Xjast/

, , .

Google ?

, , Gmail. Google ; script, .

. , Google , CSS ? , .

+8

All Articles