In the DOM are node ids case sensititve?

前端 未结 5 2058
情书的邮戳
情书的邮戳 2020-12-03 02:47

Is this HTML valid? Or is the id \'a\' the same as the id \'A\'?

alpha
Alpha
5条回答
  •  一生所求
    2020-12-03 03:31

    It is valid on all modern browsers (IE 8+) but I do not recommended it because CSS is case-insensitive. It's better to stick to one case to avoid any possible confusion or errors with CSS.

提交回复
热议问题