I have an HTML page as follows
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
<table>
<th>WEEK</th>
<th>DATES</th>
<th>Workout #1</th>
<th>Workout #2</th>
<th>Workout #3</th>
<tr>
<td>1</td>
<td>3/27-4/2</td>
<td>Warm up for 5 minutes. </td>
<td>Same as #1 for this week.</td>
<td>Same as #1 for this week.</td>
</tr>
<tr>
<td>2</td>
<td>4/3-4/9</td>
<td>Warm up for 5 minutes. </td>
<td>Same as #1 for this week.</td>
<td>Same as #1 for this week.</td>
</tr></table>
How can make only the table downloadable and printable using php and/or javascript.
Create a print stylesheet that sets everything but the table to
display: none. The browser takes care of printing, not your code, and uses your print stylesheet when doing so.