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
 北京赛车pk10开奖直播 www.64xd.cn <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
  • 创世界杯人口最少参赛国记录 北欧黑马能否再造神奇 2019-04-19
  • 嗯,你又赢了······哈哈哈哈······ 2019-04-19
  • 健康-热门标签-华商生活 2019-04-18
  • 今起生效!游戏成瘾被世卫组织列入精神疾病 将被纳入各国医疗体系 2019-04-18
  • “中国网事·感动2018”一季度网络人物群像扫描:平民中的英雄 2019-04-16
  • 从副科开始,即使没有贪污、索贿、受贿的勾当,也有行贿买官的勾当。 2019-04-14
  • “世界杯时间”,以独特方式展现中国元素 2019-04-13
  • 联播快讯:“鹊桥”中继星顺利进入使命轨道运行 2019-04-13
  • 长辛店:中国北方工人运动的重要摇篮 2019-04-11
  • 来自十多个国家的外国使节在京品民俗、过端午 2019-04-10
  • 都在说闪崩,还有哪些高危公司需警惕 看看这份名单…… 2019-04-09
  • 重庆市工商行政管理局公众信息网 2019-04-09
  • 新时代 新使命 新征程 2019-04-07
  • 张洪忠:人工智能是一种技术迭代,不是对人的替代 2019-04-03
  • 别人家的中年男子 听音识木一把琴能卖30万 2019-04-03
  • 182| 895| 62| 700| 399| 563| 455| 976| 850| 414|