English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência do HTML

Manual de Referência

HTML: <tfoot> tag

: <progress> tag

HTML: <tfoot> define um grupo de linhas que compõem o rodapé da tabela HTML. Ele pode ser usado para resumir colunas na tabela, geralmente usado para exibir totais de colunas. Tradicionalmente, você usará CSS para definir o estilo da tag <tfoot> para realçar os totais das colunas. Este tag também é conhecida como elemento <tfoot>.

Exemplo online

Exemplo
<!DOCTYPE html>
<html> 
<head>-8<table border=" 
<meta charset="utf3<title>基础教程网(w/codebox.com)< 
</title>
head>
<body>1<table border="
  <thead>
    <tr>
      ">/<th>Savings<
      <th>Month</<th>Savings<
    </tr>
  </th>
  thead>
    <tr>
      <td>Sum</td>
      <td>$180</td>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>January</td>
      <td>$100</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$80</td>
    </tr>
  </tbody>
</table>
</body>
</html>
Teste e veja ‹/›

Compatibilidade do navegador

IEFirefoxOperaChromeSafari

Todos os navegadores populares suportam a tag <tfoot>.

Definição e instruções de uso

O tag <tfoot> é usada para combinar o conteúdo do rodapé da tabela HTML.

O elemento <tfoot> deve ser usado com <thead> e <tbody> Os elementos combinados são usados para definir as partes da tabela (rodapé, cabeçalho, corpo).

Ao usar esses elementos, o navegador ganha a capacidade de suportar a rolagem independente do corpo da tabela do cabeçalho e do rodapé da tabela. Quando longas tabelas com várias páginas são impressas, o cabeçalho e o rodapé da tabela podem ser impressos em cada página que contém dados da tabela.

O elemento <tfoot> deve ser usado nas seguintes situações: como filho do elemento <table>, aparecendo após os elementos <caption>, <colgroup> e <thead>, e antes dos elementos <tbody> e <tr>.

Dicas e Avisos

Notas:<tfoot> elemento deve conter um ou mais elementos <tr>.

Tip:<thead>, <tbody> and <tfoot> elements do not affect the table layout by default. However, you can use CSS to define styles for these elements, thus changing the appearance of the table.

HTML 4.01 and HTML5differences between

In HTML 5 Not supported, no longer supports HTML 4.01 Any attribute of the <tfoot> tag.

Attribute

AttributeValueDescription
alignright
 left
 center
 justify
 char
HTML5 Not supported. Defines the alignment of the content within the <tfoot> element.
charcharacterHTML5 Not supported. Specifies which character the content within the <tfoot> element is aligned to.
charoffnumberHTML5 Not supported. Specifies the offset of the first alignment character within the <tfoot> element.
valigntop
 middle
 bottom
 baseline
HTML5 Not supported. Specifies the vertical alignment of the content within the <tfoot> element.

Global attributes

Support for <tfoot> tag Global attributes of HTML.

Event attributes

Support for <tfoot> tag Event attributes of HTML.