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.aor0.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-12-11
  • 海关严打侵权护航俄罗斯足球世界杯 2018-11-14
  • 2017年首届中国汽车公益盛典隆重举行 2018-11-13
  • 第一时间带着十九大精神到基层  2018-11-05
  • 男子冒充澳商交往多人行骗被抓 现场来6个女友 2018-11-04
  • “互联网+农村”亟待提速 网络入户遇两大难题 2018-11-04
  • 王志忠案警示录:从工人到世界500强一把手再到阶下囚 2018-10-29
  • 男子聚餐喝啤酒不喝白酒 被朋友认为不给面子殴打 2018-10-29
  • 亚冠18决赛首回合最佳阵容:哈维坐镇 曾诚中超独苗 2018-08-19
  • 山钢集团日照钢铁精品基地项目 2018-08-18
  • 这些“专家”说得相当不靠谱,没有一个说到点子上。事实上不仅“农民没有富起来”,广大工薪阶层也“没有富起来”,其根本原因在于社会财富被个人占为私有的私有... 2018-08-18
  • 共产党人要念好马克思主义“真经”(人民要论) 2018-08-17
  • 2018年4月27日划拨国家社科基金项目鉴定费名单(2) 2018-08-08
  • 防治土地荒漠化 新疆保护生态兼顾农民增收 2018-08-07
  • 国务院关税税则委员会发布关于对原产于美国500亿美元进口商品加征关税的公告 2018-08-06
  • 658| 729| 530| 359| 989| 183| 930| 806| 671| 531|