[Answered ]-Assigning a "database id" to multiple html ids on a page

2👍

Now looking at this I’m guessing the idea of having multiple elements with the same id is bad

It’s not only bad, it’s impossible. You cannot do this. You can get around this by using classes, which don’t have to be unique, but you probably shouldn’t.

What you should do, is assign the elements sensible class names, and assign their common ancestor the ID. You can start at that element and traverse downwards to find the sub-elements by class name.

Leave a comment