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.omc7.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
  • 一图在手 2018俄罗斯世界杯赛程全有 2019-04-21
  • 凝聚同心共筑中国梦的磅礴力量 2019-04-21
  • “国风秦韵”走进上合国家 陕西文创品首次海外巡展 2019-04-20
  • 本周呼声回馈:上学房产维权每天上演 食客深夜撸串成扰民新顽症 2019-04-18
  • 从朝美的对话和双方表现的诚意来看,形势正向好的方向发展。这应了中国那句解铃还需系铃人的老话,只有当事国之间的直接对话才能真正解决问题,其它都是弯路。 2019-04-18
  • 3岁男童爬窗走失 民警帮忙找家人 2019-04-13
  • 追逐梦想 世界同行——记中国梦走向世界的五年 2019-04-13
  • 百场出战彰显为国争光正能量(体坛观澜) 2019-04-03
  • 最高检等四部门出台意见 指导依法办理恐怖活动和极端主义犯罪案件 2019-03-29
  • 全国省级新税务机构统一挂牌 2019-03-27
  • 大学生绘制校园美景树叶画 2019-03-27
  • 填报志愿不能只靠大数据 2019-03-23
  • “6·18”网购画风清奇:花露水味酒、生发仪遭疯抢 2019-03-23
  • 德国缺少劳动力愿意接受“难民”还讲的过去,法国呢,巴黎的郊区和非洲一些国家的城市有一比。[微笑][微笑] 2019-03-14
  • 中纪委:有干部不信马列信鬼神 触犯纪律信小圈子 2019-03-12
  • 824| 218| 167| 938| 357| 904| 652| 347| 435| 424| 151| 549| 628| 696| 808|