views:

24

answers:

1

I was wondering if I could have more than one tables like below. If you notice, I have applied th with the id="id", and id="name". so If have the more than one tables then, there will be many ths with the same id.

<table>
    <thead>
        <tr><th id="id"></th><th id="name"></th></tr>
    </thead>
    <tbody>
        <tr><td headers="id">1</td><td headers="name">First Name</td></tr>
    </tbody>
</table>
+2  A: 

No. You can't. An id must be unique in the document.

The simplest option is to apply a prefix to each id in a given table e.g. id="mytable_name"

David Dorward