Skip to content

Instantly share code, notes, and snippets.

@ericpedia
Created February 18, 2012 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericpedia/1857682 to your computer and use it in GitHub Desktop.
Save ericpedia/1857682 to your computer and use it in GitHub Desktop.
:nth-col test table with <th> rowspans
<table><colgroup> <col width="15%" /> <col width="25%" /> <col span="4" width="30%" /> <col class="table-division-left" span="4" width="30%" /></colgroup>
<thead>
<tr>
<th scope="colgroup"></th>
<th scope="colgroup"></th>
<th scope="colgroup" colspan="4">Share with ESI</th>
<th scope="colgroup" colspan="4">Percentage-point change</th>
</tr>
<tr>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col">2000</th>
<th scope="col">2007</th>
<th scope="col">2009</th>
<th scope="col">2010</th>
<th scope="col">2000–07</th>
<th scope="col">2007–10</th>
<th scope="col">2009–10</th>
<th scope="col">2000–10</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="rowgroup"></th>
<th scope="row">Under-65 population</th>
<td>69.2%</td>
<td>63.4%</td>
<td>59.4%</td>
<td>58.6%</td>
<td>-5.8</td>
<td>-4.8</td>
<td>-0.8</td>
<td>-10.6</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="4">Age</th>
<th scope="row">0–17</th>
<td>66.7%</td>
<td>59.8%</td>
<td>55.8%</td>
<td>54.8%</td>
<td>-6.9</td>
<td>-5.0</td>
<td>-1.0</td>
<td>-11.9</td>
</tr>
<tr>
<th scope="row">18–24</th>
<td>55.1%</td>
<td>50.1%</td>
<td>45.3%</td>
<td>45.9%</td>
<td>-5.0</td>
<td>-4.2</td>
<td>0.6</td>
<td>-9.2</td>
</tr>
<tr>
<th scope="row">25–54</th>
<td>73.8%</td>
<td>67.4%</td>
<td>63.0%</td>
<td>62.2%</td>
<td>-6.4</td>
<td>-5.2</td>
<td>-0.8</td>
<td>-11.6</td>
</tr>
<tr>
<th scope="row">55–64</th>
<td>68.9%</td>
<td>68.0%</td>
<td>65.8%</td>
<td>64.5%</td>
<td>-0.9</td>
<td>-3.5</td>
<td>-1.3</td>
<td>-4.4</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="2">Gender</th>
<th scope="row">Male</th>
<td>69.1%</td>
<td>63.1%</td>
<td>58.8%</td>
<td>58.2%</td>
<td>-6.0</td>
<td>-4.9</td>
<td>-0.6</td>
<td>-10.9</td>
</tr>
<tr>
<th scope="row">Female</th>
<td>69.3%</td>
<td>63.7%</td>
<td>60.0%</td>
<td>59.1%</td>
<td>-5.6</td>
<td>-4.6</td>
<td>-0.9</td>
<td>-10.2</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="4">Race</th>
<th scope="row">White, non-Hispanic</th>
<td>76.2%</td>
<td>71.2%</td>
<td>67.7%</td>
<td>66.9%</td>
<td>-5.0</td>
<td>-4.3</td>
<td>-0.8</td>
<td>-9.3</td>
</tr>
<tr>
<th scope="row">Black, non-Hispanic</th>
<td>57.5%</td>
<td>52.6%</td>
<td>47.1%</td>
<td>45.3%</td>
<td>-4.9</td>
<td>-7.3</td>
<td>-1.8</td>
<td>-12.2</td>
</tr>
<tr>
<th scope="row">Hispanic</th>
<td>47.3%</td>
<td>42.1%</td>
<td>38.2%</td>
<td>39.2%</td>
<td>-5.2</td>
<td>-2.9</td>
<td>1.0</td>
<td>-8.1</td>
</tr>
<tr>
<th scope="row">Other</th>
<td>65.8%</td>
<td>62.7%</td>
<td>59.2%</td>
<td>58.2%</td>
<td>-3.1</td>
<td>-4.5</td>
<td>-1.0</td>
<td>-7.6</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="2">Nativity</th>
<th scope="row">Native born</th>
<td>71.2%</td>
<td>65.6%</td>
<td>61.4%</td>
<td>60.5%</td>
<td>-5.6</td>
<td>-5.1</td>
<td>-0.9</td>
<td>-10.7</td>
</tr>
<tr>
<th scope="row">Foreign born</th>
<td>53.8%</td>
<td>48.3%</td>
<td>45.0%</td>
<td>45.6%</td>
<td>-5.5</td>
<td>-2.7</td>
<td>0.6</td>
<td>-8.2</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="5">Education*</th>
<th scope="row">Less than high school</th>
<td>40.3%</td>
<td>30.8%</td>
<td>27.6%</td>
<td>28.0%</td>
<td>-9.5</td>
<td>-2.8</td>
<td>0.4</td>
<td>-12.3</td>
</tr>
<tr>
<th scope="row">High school</th>
<td>66.8%</td>
<td>57.1%</td>
<td>51.8%</td>
<td>50.6%</td>
<td>-9.7</td>
<td>-6.5</td>
<td>-1.2</td>
<td>-16.2</td>
</tr>
<tr>
<th scope="row">Some college</th>
<td>74.1%</td>
<td>67.5%</td>
<td>62.3%</td>
<td>60.7%</td>
<td>-6.6</td>
<td>-6.8</td>
<td>-1.6</td>
<td>-13.4</td>
</tr>
<tr>
<th scope="row">College</th>
<td>83.9%</td>
<td>80.3%</td>
<td>77.4%</td>
<td>76.7%</td>
<td>-3.6</td>
<td>-3.6</td>
<td>-0.7</td>
<td>-7.2</td>
</tr>
<tr>
<th scope="row">Post-college</th>
<td>88.0%</td>
<td>85.8%</td>
<td>84.7%</td>
<td>83.9%</td>
<td>-2.2</td>
<td>-1.9</td>
<td>-0.8</td>
<td>-4.1</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" rowspan="5">Household income fifth</th>
<th scope="row">Lowest</th>
<td>29.2%</td>
<td>22.1%</td>
<td>16.5%</td>
<td>15.6%</td>
<td>-7.1</td>
<td>-6.5</td>
<td>-0.9</td>
<td>-13.6</td>
</tr>
<tr>
<th scope="row">Second</th>
<td>63.1%</td>
<td>54.1%</td>
<td>46.7%</td>
<td>44.8%</td>
<td>-9.0</td>
<td>-9.3</td>
<td>-1.9</td>
<td>-18.3</td>
</tr>
<tr>
<th scope="row">Middle</th>
<td>78.1%</td>
<td>72.2%</td>
<td>67.8%</td>
<td>67.0%</td>
<td>-5.9</td>
<td>-5.2</td>
<td>-0.8</td>
<td>-11.1</td>
</tr>
<tr>
<th scope="row">Fourth</th>
<td>86.7%</td>
<td>82.5%</td>
<td>80.3%</td>
<td>80.5%</td>
<td>-4.2</td>
<td>-2.0</td>
<td>0.2</td>
<td>-6.2</td>
</tr>
<tr>
<th scope="row">Highest</th>
<td>89.2%</td>
<td>87.3%</td>
<td>85.7%</td>
<td>85.5%</td>
<td>-1.9</td>
<td>-1.8</td>
<td>-0.2</td>
<td>-3.7</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment