Clone a table

Clone a table

Let's say I have a table like this:

  1. <table id="table1" style="width:50%">
      <tr>
        <th>Firstname</th>
        <th>Lastname</th> 
        <th>Age</th>
      </tr>
      <tr>
        <td>Jill</td>
        <td>Smith</td> 
        <td>50</td>
      </tr>
      <tr>
        <td>Eve</td>
        <td>Jackson</td> 
        <td>94</td>
      </tr>
    </table>
How do I clone this table, and at the same time change id to "clone1"? And preferable put it horizontally next to table1.