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
  • 酒旅行走于法国葡萄酒香之路 品味美景与美酒美景酒香 2019-04-25
  • 可见所谓专家很蠢,木有社会化、规模化的社会大生产,分田单干的农人怎么富得起来咧。 2019-04-16
  • 荆楚网互联网出版机构 2019-04-16
  • 改进学术评价 加强学术规范 2019-04-12
  • 首席大检察官首次列席最高法审委会 讨论了两起重大抗诉案件 2019-04-12
  • 努力把各级党组织锻造得更加坚强有力——四论认真学习贯彻省委十二届四次全会精神 2019-04-10
  • 宁波本土手工匠人创作的青瓷作品“海曙楼青瓷盘”亮相 2019-04-10
  • 绿博会开放普通观众注册通道 2019-04-04
  • 一语惊坛(5月16日):正在日益复兴强盛的中国,有能力引领世界繁荣发展! 2019-03-19
  • 被你们说棕子说馋了,放在冰箱里准备端午吃的几个棕子煮上了下午吃,过两天再买,太不计划经济了,呵呵。 2019-03-16
  • 李军的专栏作者中国国家地理网 2019-03-16
  • 人的本质的演变规律:从原始母系氏族社会的公有者经过父系氏族社会私有和公有双重所有者而演变为私有制阶级社会的私有者,然后经过现代社会公有和私有双重所有者... 2019-03-13
  • 科普中国形象大使、国家一级演员陈思思做客人民网 2019-03-10
  • 泰国推出“智慧签证”吸引人才 2019-03-10
  • 阿兰启程世界杯 清爽简约look现身机场阿兰 世界杯 2019-02-17
  • 767| 62| 299| 204| 878| 811| 65| 51| 135| 504|