HTML tfoot tag 您所在的位置:网站首页 tfoot怎么读英语 HTML tfoot tag

HTML tfoot tag

2024-07-12 18:55| 来源: 网络整理| 查看: 265

HTML Tag ❮ Previous Complete HTML Reference Next ❯ Example

An HTML table with a , , and a element:

            Month       Savings                   January       $100               February       $80                   Sum       $180       Try it Yourself »

More "Try it Yourself" examples below.

Definition and Usage

The tag is used to group footer content in an HTML table.

The element is used in conjunction with the and elements to specify each part of a table (footer, header, body).

Browsers can use these elements to enable scrolling of the table body independently of the header and footer. Also, when printing a large table that spans multiple pages, these elements can enable the table header and footer to be printed at the top and bottom of each page.

Note: The element must have one or more tags inside.

The tag must be used in the following context: As a child of a element, after any , , , and elements.

Tip: The , , and elements will not affect the layout of the table by default. However, you can use CSS to style these elements (see example below)!

Browser Support Element Yes Yes Yes Yes Yes Global Attributes

The tag also supports the Global Attributes in HTML.

Event Attributes

The tag also supports the Event Attributes in HTML.

More Examples Example

Style , , and with CSS:

thead {color: green;}tbody {color: blue;} tfoot {color: red;}

table, th, td {  border: 1px solid black; }

            Month       Savings                   January       $100               February       $80                   Sum       $180      

Try it Yourself » Example

How to align content inside (with CSS):

      Month    Savings        January    $100        February    $80              Sum      $180      Try it Yourself » Example

How to vertical align content inside (with CSS):

      Month    Savings        January    $100        February    $80              Sum      $180      Try it Yourself » Default CSS Settings

Most browsers will display the element with the following default values:

tfoot {  display: table-footer-group;  vertical-align: middle;   border-color: inherit;}

❮ Previous Complete HTML Reference Next ❯ ★ +1   W3schools Pathfinder Track your progress - it's free!   Log in Sign Up


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有