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.wyzfyv.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 城市推动力】用城市力量建设大美陕西! 2018-09-19
  • 紫光阁中共中央国家机关工作委员会 2018-09-19
  • 为了陪留守儿童欢乐过节 社区干部凌晨赶赴山区“圆心愿” 2018-08-23
  • 汕尾,一座不想离开的城文章中国国家地理网 2018-08-23
  • 首届交易银行国际论坛在京召开 2018-08-22
  • China knows better as Trump tariff strategy tricks US voters 2018-08-22
  • 2016·第十四届中关村国际美食节开幕 2018-08-21
  • 多造核弹是浪费!研究认为百枚核弹就足以造成“核秋天” 2018-08-21
  • 哈巴河县阿克齐湿地夕阳西下天水相接 犹如仙境 2018-08-16
  • 吴尊送儿子上学晒自拍 父子颜值超高Max笑容灿烂 2018-08-13
  • 哈萨克斯坦今年启动290MW太阳能发电项目 2018-07-01
  • 彗星尘埃中发现太阳系形成时的“遗物” 2018-07-01
  • 偶遇范冰冰及父母为范丞丞庆生聚餐 打扮低调朴素 2018-07-01
  • 武汉今秋迎11.5万名小学新生 “房户一致”优先 2018-07-01
  • 青藏铁路边的野生动物 2018-06-30
  • 27| 631| 635| 621| 150| 683| 79| 975| 683| 281|