Class Th
The th element represents a header cell in a table. It is used to contain header information for a column or row, providing context and meaning to the data cells (td) in the table. The th element supports various attributes for accessibility, spanning multiple columns or rows, and defining the relationship between header and data cells.
Examples:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.bean.html5.HtmlElementMixed
child, children, getChild, getChild, getChild, getChildren, setChildrenMethods inherited from class org.apache.juneau.bean.html5.HtmlElement
accesskey, attr, attrUri, class_, contenteditable, deminimize, dir, getAttr, getAttr, getAttrs, hidden, id, lang, onabort, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, oncuechange, ondblclick, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting, self, setAttrs, spellcheck, style, tabindex, title, toString, translate
-
Constructor Details
-
Method Details
-
abbr
abbr attribute.Specifies an alternative, abbreviated label for the header cell. This is used by screen readers and other assistive technologies when referencing the cell in other contexts.
The abbreviation should be shorter than the full header text but still meaningful.
- Parameters:
value- The abbreviated label for the header cell. Can benull to unset the attribute.- Returns:
- This object.
-
colspan
colspan attribute.Number of columns that the cell is to span.
-
headers
headers attribute.Specifies the IDs of header cells that apply to this table cell. This creates a programmatic relationship between the cell and its headers for accessibility purposes.
Multiple IDs can be specified as a space-separated list.
- Parameters:
value- The IDs of header cells that apply to this cell. Can benull to unset the attribute.- Returns:
- This object.
-
rowspan
rowspan attribute.Number of rows that the cell is to span.
-
scope
scope attribute.Specifies which cells the header cell applies to. This helps define the relationship between header and data cells for accessibility.
Possible values:
"row" - Header applies to all cells in the same row"col" - Header applies to all cells in the same column"rowgroup" - Header applies to all cells in the same row group"colgroup" - Header applies to all cells in the same column group
- Parameters:
value- Which cells the header cell applies to. Can benull to unset the attribute.- Returns:
- This object.
-
sorted
sorted attribute.Specifies the sort direction and ordinality of the column. This indicates how the table is currently sorted and which column is the primary sort key.
Common values:
"asc" - Column is sorted in ascending order"desc" - Column is sorted in descending order"asc 1" - Column is the primary sort key in ascending order"desc 1" - Column is the primary sort key in descending order
- Parameters:
value- The sort direction and ordinality of the column. Can benull to unset the attribute.- Returns:
- This object.
-