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
 浙江6+1走势图 www.0cq5.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-16
  • 女性头晕多吃这些食物:莲子栗子和核桃 2019-04-08
  • 澳大利亚树皮画将赴华巡展 2019-04-07
  • 警察蜀黍变“戏精” 演绎最“正经”春节安全防范短片 2019-04-07
  • 日本将成人年龄下调至18岁 女性结婚年龄上调至18岁 2019-04-05
  • 最美季节走醉美线路——新疆伊犁大环线文章中国国家地理网 2019-04-02
  • 现代心素派:炸时蔬 结缘汤圆 2019-03-27
  • 萌萌哒童趣美食来袭 “六一”就给小朋友做这个 2019-03-27
  • 全省手机报推广发行经验交流会在大悟召开 2019-03-26
  • 金正恩对中国进行访问 2019-03-21
  • 日本民族将会为最终拥核而战!现在日本保有47吨钚足己制造6000枚核弹,并且日本具有资金和技术优势一星期之內就可拥核!冷眼细观世界笑骂指点江山 ... 2019-03-14
  • 日本大阪6.1级地震已致4人死亡 370多人受伤 2019-03-07
  • “6·18”网购画风清奇:花露水味酒、生发仪遭疯抢 2019-03-05
  • 花落谷雨时 此心留春住:一个民族的细腻诗意何在? 2019-03-03
  • 499| 927| 791| 543| 769| 653| 763| 447| 303| 211|