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
 穿越火线4+1 www.yfq3.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
  • 高校招生广告的创新值得鼓励 2019-04-18
  • 总而言之,要把足球运动从一种生存方式转变成高级需求!才能把投身足球运动的人从追逐金钱的庸俗之路引导到追求光荣与梦想的正途上! 2019-04-18
  • 倒着走能治腰颈椎痛?假的! 2019-04-16
  • 端午女儿节 妍饰小闺女 2019-04-16
  • 豆渣-热门标签-华商生活 2019-04-15
  • 联合国副秘书长盖图中国是全球减贫典范 2019-04-12
  • 优化部省合作机制 服务国家重大战略 2019-04-12
  • 女子和现任一起挥泪卖“前男友礼物”半年骗取10万 2019-04-01
  • 提升双创教育质量的关键在机制协同 2019-04-01
  • 十九大党章修正案的新时代意蕴 2019-03-22
  • 月薪3000男会计豪掷930万打赏 女主播该退钱吗? 2019-03-10
  • 郑州:首批126名教师住进公租房 2018-09-25
  • 共产主义的终极目标就是消灭剥削,而消灭剥削,首先从主要生产资料公有化开始。资本私有制是同共产主义背道而驰的。 2018-08-05
  • 换装就飞战术应用课目 2018-08-05
  • 江西省福彩中心深入开展党建教育活动 2018-08-03
  • 270| 491| 666| 229| 524| 758| 978| 526| 162| 301|