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.e07r.com.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
  • @院士或大师团队:速来参与广州规划设计和建筑设计! 2018-11-23
  • 马布里回忆6年前总决赛:李春江执教的球队都很脏 2018-11-07
  • [大笑]逻辑玩不过又开始玩语文了?那你更不是对手! 2018-11-04
  • 难民救援船将抵达西班牙 2018-11-04
  • 珠宝配美人!李冰冰大片衣着性感秀身段 2018-10-31
  • 2018中国北方国际自行车电动车展--天津频道--人民网 2018-10-31
  • 这样吃饭让你瞬间有食欲:厌食常喝金桔水 2018-10-24
  • 把住网红食品安全关(民生观) 2018-10-10
  • 韩正出席企业职工基本养老保险基金中央调剂制度贯彻实施工作会议 2018-10-03
  • 山西省直机关第五届职工运动会开幕 2018-08-20
  • 赞扬和推荐看着就想笑文章《如何制订企业发展计划》 2018-08-20
  • 皇马门神领衔 “加勒比海盗”再续荣光? 2018-08-08
  • 劳动不是人的本质,对劳动成果即社会财富的占有才是人的本质。在私有制阶级社会中,劳动成果即社会财富被剥削阶级无偿占有,所以人的本质便表现为阶级本质,“每... 2018-07-27
  • 人为财死鸟为食亡,看起来很朴素的道理。所谓领袖,就是能把各向异性的人为财死的行为变为各向同性的人为志亡的行动,基础就是靠着为人提供安居乐业的机会,让人不再有分散 2018-07-27
  • 走近央视主播张静:爱好阅读 心系公益 满满正能量 2018-07-01
  • 247| 481| 805| 67| 824| 137| 633| 153| 604| 956|