Can an html element have multiple ids?

前端 未结 18 2368
天命终不由人
天命终不由人 2020-11-22 07:40

I understand that an id must be unique within an HTML/XHTML page.

My question is, for a given element, can I assign multiple ids to it?

18条回答
  •  臣服心动
    2020-11-22 08:18

    That's interesting, but as far as I know the answer is a firm no. I don't see why you need a nested ID, since you'll usually cross it with another element that has the same nested ID. If you don't there's no point, if you do there's still very little point.

提交回复
热议问题