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
 中国体育彩票36选7开奖结果 www.30by.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-28
  • 沁园春 春色—野夫.blog的博客—强国博客—人民网 2018-11-28
  • 嘉善县:建设“智安小区” 积极推动社会治理创新 2018-11-24
  • 大米-热门标签-华商生活 2018-11-24
  • 一线视角:发挥新乡贤的有益力量 2018-10-21
  • 大厨风范的海鲜做法,小白也能学会,鲜美营养,好吃到哭 2018-10-20
  • 国际资本涌动长租公寓市场 看重长期稳定性 ——凤凰网房产深圳 2018-10-20
  • 新疆北屯市现日晕奇观 2018-10-12
  • 吉林省首届艺术节拉开帷幕 2018-10-05
  • 中国人打仗?被逗了。独生子一代、捧在手里长大的90后00后、站在甲板上飒爽英姿、硝烟战火血肉横飞的场景、会失去行动能力的。这不是耸人听闻。 2018-10-05
  • 无论什么制度关键是配套措施要跟得上,权衡哪种方法更科学。 2018-09-29
  • 网络医疗广告套路太多 消费者讲述就医被坑经历 2018-09-29
  • 露营玩漂流 重庆周边度假地推荐 2018-09-12
  • 【专题】走龙江丝路 向北看发展 华南城 全国重点网媒龙江集中采访活动 2018-09-08
  • 女教师课上画高树讲高数 学生原来高数真是树! 2018-09-08
  • 639| 846| 516| 952| 446| 851| 718| 235| 845| 264|