标签和说明 |
<table>
它是一个主要的容器,它包装元素以表格格式显示数据。
|
<thead>
它是表格的顶部,包含表格标题行的元素。
|
<tbody>
它包含表格主体中表格行(<tr>)的元素。
|
<tr>
它指定出现在单行上的一组表格单元格(<td> 或 <td>)。
|
<th>
它定义表格单元格的标题。
|
<td>
这是一个默认的表格单元格。
|
<tfoot>
它是表格的底部。
|
<!DOCTYPE html> <html> <head> <meta charset = "utf-8"> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <title>Bulma Elements Example</title> <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css"> <script src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script> </head> <body> <section class = "section"> <div class = "container"> <span class = "is-size-5"> Basic Table </span> <br> <table class = "table"> <thead> <tr> <th>Position</th> <th>Name</th> <th>Country</th> </tr> </thead> <tfoot> <tr> <th><abbr title = "Position">Pos</abbr></th> <th>Player</th> <th> <abbr title = "Played for the country">Country</abbr> </th> </tr> </tfoot> <tbody> <tr> <td>1</td> <td>Sachin</td> <td>India</td> </tr> <tr> <td>2</td> <td>Smith</td> <td>Australia</td> </tr> <tr> <td>3</td> <td>Joe Root</td> <td>England</td> </tr> </tbody> </table> </div> </section> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset = "utf-8"> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <title>Bulma Elements Example</title> <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css"> <script src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script> </head> <body> <section class = "section"> <div class = "container"> <span class = "is-size-5"> Bordered Table </span> <br> <table class = "table is-bordered"> <thead> <tr> <th>Position</th> <th>Name</th> <th>Country</th> </tr> </thead> <tfoot> <tr> <th> <abbr title = "Position">Pos</abbr> </th> <th>Player</th> <th> <abbr title = "Played for the country">Country</abbr> </th> </tr> </tfoot> <tbody> <tr> <td>1</td> <td>Sachin</td> <td>India</td> </tr> <tr> <td>2</td> <td>Smith</td> <td>Australia</td> </tr> <tr> <td>3</td> <td>Joe Root</td> <td>England</td> </tr> </tbody> </table> </div> </section> </body> </html>