HTML 5 classnames and IDs

后端 未结 2 1620
星月不相逢
星月不相逢 2020-12-12 00:01

I know that in HTML4 classes and id cannot start with numbers.

I am coding in HTML 5/php and alot of my ids and classes have just numbers in them that point to a pri

2条回答
  •  遥遥无期
    2020-12-12 00:29

    The official html5 specs are here: id-attribute in html5.

    (Here you go for html4)

    So in html5 the only restriction is minimum 1 char and no whitespaces.

提交回复
热议问题