I’d like to use a <tfoot> tag in a table to be semantically correct, but it keeps showing up at the the top of my table. Is there a way to tell it to display at the bottom?
I’d like to use a <tfoot> tag in a table to be semantically correct,
Share
According to the specification, you may place the
tfootbefore, or after, thetbodyelement(s). See the following description from the previous link.Contexts in which this element can be used:
As a child of a table element, after any caption, colgroup, and thead elements and before any tbody and tr elements, but only if there are no other tfoot elements that are children of the table element.
As a child of a table element, after any caption, colgroup, thead, tbody, and tr elements, but only if there are no other tfoot elements that are children of the table element.
Regardless of where you place the markup, the footer information will be displayed at the bottom visually.