diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/html/element%2Ftfoot.html | |
new repository
Diffstat (limited to 'devdocs/html/element%2Ftfoot.html')
| -rw-r--r-- | devdocs/html/element%2Ftfoot.html | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/devdocs/html/element%2Ftfoot.html b/devdocs/html/element%2Ftfoot.html new file mode 100644 index 00000000..689c1b51 --- /dev/null +++ b/devdocs/html/element%2Ftfoot.html @@ -0,0 +1,160 @@ +<header><h1><tfoot>: The Table Foot element</h1></header><div class="section-content"><p>The <code><tfoot></code> <a href="../index">HTML</a> element defines a set of rows summarizing the columns of the table.</p></div> +<h2 id="try_it">Try it</h2> +<div class="section-content"><iframe class="interactive is-tabbed-taller-height" height="200" src="https://interactive-examples.mdn.mozilla.net/pages/tabbed/tfoot.html" title="MDN Web Docs Interactive Example" loading="lazy"></iframe></div> +<h2 id="attributes">Attributes</h2> +<div class="section-content"><p>This element includes the <a href="../global_attributes">global attributes</a>.</p></div> +<h3 id="deprecated_attributes">Deprecated attributes</h3> +<div class="section-content"> +<p>The following attributes are deprecated and should not be used. They are documented below for reference when updating existing code and for historical interest only.</p> <dl> <dt id="align"> +<a href="#align"><code>align</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> +</dt> <dd> <p>This <a href="https://developer.mozilla.org/en-US/docs/Glossary/Enumerated">enumerated</a> attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:</p> <ul> <li> +<code>left</code>, aligning the content to the left of the cell</li> <li> +<code>center</code>, centering the content in the cell</li> <li> +<code>right</code>, aligning the content to the right of the cell</li> <li> +<code>justify</code>, inserting spaces into the textual content so that the content is justified in the cell</li> <li> +<code>char</code>, aligning the textual content on a special character with a minimal offset, defined by the <a href="#char"><code>char</code></a> and <a href="#charoff"><code>charoff</code></a> attributes.</li> </ul> <p>If this attribute is not set, the <code>left</code> value is assumed.</p> <div class="notecard note" id="sect1"> <p><strong>Note:</strong></p> <ul> <li>To achieve the same effect as the <code>left</code>, <code>center</code>, <code>right</code> or <code>justify</code> values, use the CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/text-align"><code>text-align</code></a> property on it.</li> <li>To achieve the same effect as the <code>char</code> value, in CSS, you can use the value of the <a href="#char"><code>char</code></a> as the value of the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/text-align"><code>text-align</code></a> property.</li> </ul> </div> </dd> <dt id="bgcolor"> +<a href="#bgcolor"><code>bgcolor</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> +</dt> <dd> <p>The background color of the table. It is a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color">6-digit hexadecimal RGB code</a>, prefixed by a '<code>#</code>'. One of the predefined <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/named-color">color keywords</a> can also be used.</p> <p>To achieve a similar effect, use the CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-color"><code>background-color</code></a> property.</p> </dd> <dt id="char"> +<a href="#char"><code>char</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> +</dt> <dd> <p>This attribute specifies the alignment of the content in a column to a character. Typical values for this include a period (.) when attempting to align numbers or monetary values. If <a href="#align"><code>align</code></a> is not set to <code>char</code>, this attribute is ignored.</p> </dd> <dt id="charoff"> +<a href="#charoff"><code>charoff</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> +</dt> <dd> <p>This attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the <code>char</code> attribute.</p> </dd> <dt id="valign"> +<a href="#valign"><code>valign</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> +</dt> <dd> <p>This attribute specifies the vertical alignment of the text within each row of cells of the table footer. Possible values for this attribute are:</p> <ul> <li> +<code>baseline</code>, which will put the text as close to the bottom of the cell as it is possible, but align it on the <a href="https://en.wikipedia.org/wiki/Baseline_%28typography%29" target="_blank">baseline</a> of the characters instead of the bottom of them. If characters are all of the size, this has the same effect as <code>bottom</code>.</li> <li> +<code>bottom</code>, which will put the text as close to the bottom of the cell as it is possible;</li> <li> +<code>middle</code>, which will center the text in the cell;</li> <li>and <code>top</code>, which will put the text as close to the top of the cell as it is possible.</li> </ul> <div class="notecard note" id="sect2"> <p><strong>Note:</strong> Do not use this attribute as it is obsolete (and not supported) in the latest standard: instead set the CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align"><code>vertical-align</code></a> property on it.</p> </div> </dd> </dl> +</div> +<h2 id="examples">Examples</h2> +<div class="section-content"><p>Please see the <a href="table"><code><table></code></a> page for examples on <code><tfoot></code>.</p></div> +<h2 id="technical_summary">Technical summary</h2> +<div class="section-content"><figure class="table-container"><div class="_table"><table class="properties"> <tbody> <tr> <th scope="row"><a href="../content_categories">Content categories</a></th> <td>None.</td> </tr> <tr> <th scope="row">Permitted content</th> <td>Zero or more <a href="tr"><code><tr></code></a> elements.</td> </tr> <tr> <th scope="row">Tag omission</th> <td> The start tag is mandatory. The end tag may be omitted if there is no more content in the parent <a href="table"><code><table></code></a> element. </td> </tr> <tr> <th scope="row">Permitted parents</th> <td> A <a href="table"><code><table></code></a> element. The <a href="tfoot" aria-current="page"><code><tfoot></code></a> must appear after any <a href="caption"><code><caption></code></a>, <a href="colgroup"><code><colgroup></code></a>, <a href="thead"><code><thead></code></a>, <a href="tbody"><code><tbody></code></a>, or <a href="tr"><code><tr></code></a> element. Note that this is the requirement in HTML.<br>Originally, in HTML4, the opposite was true: the <a href="tfoot" aria-current="page"><code><tfoot></code></a> element could not be placed after any <a href="tbody"><code><tbody></code></a> or <a href="tr"><code><tr></code></a> element. </td> </tr> <tr> <th scope="row">Implicit ARIA role</th> <td><code><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/rowgroup_role">rowgroup</a></code></td> </tr> <tr> <th scope="row">Permitted ARIA roles</th> <td>Any</td> </tr> <tr> <th scope="row">DOM interface</th> <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement"><code>HTMLTableSectionElement</code></a></td> </tr> </tbody> </table></div></figure></div> +<h2 id="specifications">Specifications</h2> +<div class="_table"><table class="standard-table"> +<thead><tr><th scope="col">Specification</th></tr></thead> +<tbody><tr><td><a href="https://html.spec.whatwg.org/multipage/tables.html#the-tfoot-element">HTML Standard <br><small># the-tfoot-element</small></a></td></tr></tbody> +</table></div> +<h2 id="browser_compatibility">Browser compatibility</h2> +<div class="_table"><table> +<thead> +<tr id="bct-browser-type"> +<th></th> +<th colspan="6">Desktop</th> +<th colspan="6">Mobile</th> +</tr> +<tr id="bct-browsers"> +<th></th> +<th>Chrome</th> +<th>Edge</th> +<th>Firefox</th> +<th>Internet Explorer</th> +<th>Opera</th> +<th>Safari</th> +<th>WebView Android</th> +<th>Chrome Android</th> +<th>Firefox for Android</th> +<th>Opera Android</th> +<th>Safari on IOS</th> +<th>Samsung Internet</th> +</tr> +</thead> +<tbody> +<tr> +<th><code>tfoot</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">≤12.1</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">≤12.1</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">1.0</td> +</tr> +<tr> +<th><code>align</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">3</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">2</td> +<td class="bc-supports-yes">1.0</td> +</tr> +<tr> +<th><code>bgcolor</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">≤15</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">≤14</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">1.0</td> +</tr> +<tr> +<th><code>char</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-no">No</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">≤4</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-no">No</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">≤3.2</td> +<td class="bc-supports-yes">1.0</td> +</tr> +<tr> +<th><code>charoff</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">≤4</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">≤3.2</td> +<td class="bc-supports-yes">1.0</td> +</tr> +<tr> +<th><code>valign</code></th> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">12</td> +<td class="bc-supports-yes">1</td> +<td class="bc-supports-yes">Yes</td> +<td class="bc-supports-yes">15</td> +<td class="bc-supports-yes">3</td> +<td class="bc-supports-yes">4.4</td> +<td class="bc-supports-yes">18</td> +<td class="bc-supports-yes">4</td> +<td class="bc-supports-yes">14</td> +<td class="bc-supports-yes">2</td> +<td class="bc-supports-yes">1.0</td> +</tr> +</tbody> +</table></div> +<h2 id="see_also">See also</h2> +<div class="section-content"><ul> <li>Other table-related HTML Elements: <a href="caption"><code><caption></code></a>, <a href="col"><code><col></code></a>, <a href="colgroup"><code><colgroup></code></a>, <a href="table"><code><table></code></a>, <a href="tbody"><code><tbody></code></a>, <a href="td"><code><td></code></a>, <a href="th"><code><th></code></a>, <a href="thead"><code><thead></code></a>, <a href="tr"><code><tr></code></a>;</li> <li>CSS properties and pseudo-classes that may be specially useful to style the <code><tfoot></code> element: <ul> <li>the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child"><code>:nth-child</code></a> pseudo-class to set the alignment on the cells of the column;</li> <li>the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/text-align"><code>text-align</code></a> property to align all cells content on the same character, like '.'.</li> </ul> </li> </ul></div><div class="_attribution"> + <p class="_attribution-p"> + © 2005–2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br> + <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot</a> + </p> +</div> |
