Possible Duplicate:
Can an html element have multiple ids?
Is it possible multiple id ? Can I use it like this ?
$("#example" + " #example2")
Html
<section id="example example2"></section>
Possible Duplicate:
Can an html element have multiple ids?
Is it possible multiple id ? Can I use it like this ?
$("#example" + " #example2")
Html
<section id="example example2"></section>
You should not use multiple IDs. If you need that use classes.
No It's not possible according to XHTML 1.0 Spec
HTML 4 defined the name attribute for the elements a, applet, form, frame, iframe, img, and map. HTML 4 also introduced the id attribute. Both of these attributes are designed to be used as fragment identifiers.
In XML, fragment identifiers are of type ID, and there can only be a single attribute of type ID per element. Therefore, in XHTML 1.0 the id attribute is defined to be of type ID. In order to ensure that XHTML 1.0 documents are well-structured XML documents, XHTML 1.0 documents MUST use the id attribute when defining fragment identifiers on the elements listed above. See the HTML Compatibility Guidelines for information on ensuring such anchors are backward compatible when serving XHTML documents as media type text/html.
Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML.
But according to W3 It's a YES
If an element has multiple ID attributes, all of them must be treated as IDs for that element for the purposes of the ID selector. Such a situation could be reached using mixtures of xml:id, DOM3 Core, XML DTDs, and namespace-specific knowledge.
Common usage
ID's are single use and are only applied to one element. They are used to identify a single element. Classes can be used more than once. They can therefore be applied to more than one element, and more than once per element
I think it's not (i tried it on JS fiddle), why on Earth would you need to have multiple IDs... I'm sure there's some much more elegant solution to your problem... can you specify it somehow?