HTML5 Table Template
HTML5 Table Template, HTML5表格模板, 基本涵盖表格中所用元素.
A good designer knows that tables should not be used for layout, but rather for displaying columns and rows of data. HTML enables the creation of well-structured, well-formatted tables, but they’re used infrequently enough to make remembering all of the different elements and attributes rather time-consuming and tedious. So to make things easier, here is a clean HTML5 template to speed-up development for your next project:
<table dir="ltr" width="500" border="1"> <caption>Here we assign header information to cells by setting the scope attribute. </caption> <colgroup width="50%" /> <colgroup id="colgroup" class="colgroup" align="center" valign="middle" title="title" width="1*" span="2" style="background:#ddd;" /> <thead> <tr> <th scope="col">Name</th> <th scope="col">Side</th> <th scope="col">Role</th> </tr> </thead> <tfoot> <tr> <td>Darth Vader</td> <td>Dark</td> <td>Sith</td> </tr> </tfoot> <tbody> <tr> <td>Obi Wan Kenobi</td> <td>Light</td> <td>Jedi</td> </tr> <tr> <td>Greedo</td> <td>South</td> <td>Scumbag</td> </tr> </tbody> </table>
代码来源: HTML5 Table Template