HTML tfoot tag | 您所在的位置:网站首页 › tfoot怎么读英语 › HTML tfoot tag |
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 UsageThe 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 AttributesThe tag also supports the Global Attributes in HTML. Event AttributesThe tag also supports the Event Attributes in HTML. More Examples ExampleStyle , , 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 » ExampleHow to align content inside (with CSS): Month Savings January $100 February $80 Sum $180 Try it Yourself » ExampleHow to vertical align content inside (with CSS): Month Savings January $100 February $80 Sum $180 Try it Yourself » Default CSS SettingsMost 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 实验室设备网 版权所有 |