Table markup

Tag Description
<table> Wrapping element for displaying data in a tabular format
<thead> Container element for table header rows (<tr>) to label table columns
<tbody> Container element for table rows (<tr>) in the body of the table
<tr> Container element for a set of table cells (<td> or <th>) that appears on a single row
<td> Default table cell
<th> Special table cell for column (or row, depending on scope and placement) labels
Must be used within a <thead>
<caption> Description or summary of what the table holds, especially useful for screen readers
 江苏十一选五视频 www.v4pt.com <table>
  <thead>
    <tr>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

Table options

Name Class Description
Default None No styles, just columns and rows
Basic .table Only horizontal lines between rows
Bordered .table-bordered Rounds corners and adds outer border
Zebra-stripe .table-striped Adds light gray background color to odd rows (1, 3, 5, etc)
Condensed .table-condensed Cuts vertical padding in half, from 8px to 4px, within all td and th elements

Example tables

1. Default table styles

Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the .table class is required.

<table class="table">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

2. Striped table

Get a little fancy with your tables by adding zebra-striping—just add the .table-striped class.

Note: Striped tables use the :nth-child CSS selector and is not available in IE7-IE8.

<table class="table table-striped">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

3. Bordered table

Add borders around the entire table and rounded corners for aesthetic purposes.

<table class="table table-bordered">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
Mark Otto @TwBootstrap
2 Jacob Thornton @fat
3 Larry the Bird @twitter

4. Condensed table

Make your tables more compact by adding the .table-condensed class to cut table cell padding in half (from 8px to 4px).

<table class="table table-condensed">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

5. Combine them all!

Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.

<table class="table table-striped table-bordered table-condensed">
  ...
</table>
Full name
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter
  • 网友给太原市市长留言获回复 共计11条 2019-05-19
  • 新华社全媒体报道平台 2019-05-07
  • 这家央企的员工为何这么拼? 2019-05-07
  • 习近平:坚决打好污染防治攻坚战 推动生态文明建设迈上新台阶 2019-05-06
  • 海淀区马连洼街道举办全国助残日宣传活动 2019-05-02
  • 林芝市墨脱县“石锅之乡”见闻 2019-05-02
  • 安徽省投资集团控股有限公司 2019-04-28
  • 北京市北京福瑞林肯中心4S店【在线咨询】 2019-04-17
  • 观星地旅行地中国国家地理网 2019-04-17
  • 新华时评:成果不易,更需诚意与信任呵护 2019-04-16
  • 端午假期国内游客超8900万人次 全域旅游见成效 2019-04-16
  • 2017最具体育活力城市排行榜 2019-04-12
  • 秘鲁侨界研讨两岸关系和平发展 2019-04-09
  • 一个社会是市场经济多还是计划经济多,不是建立搞市场经济就不发展公有制。 2019-04-08
  • 别让“屈原留下三天端午假”的段子再流传 2019-04-08
  • 236| 552| 594| 402| 607| 330| 465| 734| 265| 755| 252| 56| 298| 94| 94|