A very simple css for a very simple html table
The css
#simple-tb { border: 1px solid black; border-collapse:collapse; } #simple-tb th { border: 1px solid black; background-color:#ccc; text-align: left; } #simple-tb td { border:1px solid black; padding:5px; } #simple-tb tr:nth-child(even) { background-color: #eee; }
The html table
<table id='simple-tb'> <thead> <tr><th>ID</th><th>Name</th><th>Age</th></tr> </thead> <tbody> <tr><td>12134</td><td>Anni</td><td>22</td></tr> <tr><td>21244</td><td>Ben</td><td>27</td></tr> <tr><td>67333</td><td>Cay</td><td>21</td></tr> <tr><td>15524</td><td>Denny</td><td>23</td></tr> <tr><td>53325</td><td>Eddie</td><td>19</td></tr> <tr><td>56126</td><td>Frank</td><td>17</td></tr> <tr><td>28347</td><td>Gail</td><td>21</td></tr> </tbody> </table>
The result
ID | Name | Age |
---|---|---|
12134 | Anni | 22 |
21244 | Ben | 27 |
67333 | Cay | 21 |
15524 | Denny | 23 |
53325 | Eddie | 19 |
56126 | Frank | 17 |
28347 | Gail | 21 |
Search within Codexpedia
Custom Search
Search the entire web
Custom Search
Related Posts