locked
Can there be two or more elements that have the same id selector value RRS feed

  • Question

  • Hello

    In HTML, Can there be two or more elements that have the same id selector value

    regards

    Manoj Gokhale


    Thursday, May 9, 2019 10:38 AM

All replies

  • Hi friend

    Welcome to the MSDN forum.

    As I know. It can’t. Element IDs should be unique within the entire document.

    There must not be multiple elements in a document that have the same id value.” Taken from : https://www.w3.org/TR/2012/WD-html-markup-20121025/global-attributes.html#common.attrs.id

    If you are interesting to it deeply. More members discussed it in this similar thread: https://stackoverflow.com/questions/5611963/can-multiple-different-html-elements-have-the-same-id-if-theyre-different-eleme.

    Please feel free to let me know if it unblocks you

    Sincerely

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by May Luo-MSFT Wednesday, May 15, 2019 9:20 AM
    Friday, May 10, 2019 2:40 AM
  • Hi Manojasdfg09876,

    Long time no hear you. Did you solve this issue or not?

    Have any update you would like to share us?

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, May 15, 2019 9:21 AM