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
 吉林快3预测号码 www.8uvw.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-05-17
  • 21世纪马克思主义的实践贡献与时代价值 2019-05-17
  • 一季度净利润靠“卖卖卖” 鲁银投资转型卖盐了? 2019-05-06
  • 专属球队定制装饰火爆 足球盛宴更是消费大餐——浙江在线 2019-05-04
  • 庆祝中国人民解放军建军90周年大会 2019-04-29
  • 贫困国有林场获扶贫资金 2019-04-29
  • 《最想饲养的动漫宠物》如果养的猫猫狗狗会讲话... 2019-04-22
  • 平安产险3.0智能门店落沪 2019-04-17
  • 成果转化重要平台 创交会三年落地项目超过140项 2019-04-15
  • 从蔡徐坤到王菊到韩宇,他们火爆的背后只有一个真理 2019-04-10
  • 我国道路货运行业从业人员超2100万 2019-04-10
  • 古人帽子如此奢华 见证风雅往事 2019-04-08
  • 西安上线“垃圾银行3.0” 它比烟头革命更可能成功! 2019-04-08
  • 《在人间》第153期:南疆十日 2019-04-01
  • 玄关运用有四大原则 用的好才能财旺挡煞聚财 ——凤凰网房产 2019-03-22
  • 642| 459| 970| 609| 783| 809| 943| 915| 995| 466|