Class Thead


@Bean(typeName="thead") public class Thead extends HtmlElementContainer
DTO for an HTML <thead> element.

The thead element represents a group of rows that consist of the column labels (headers) for the parent table element. It is used to group header rows of a table, separating them from the body (tbody) and footer (tfoot) sections. The thead element can contain multiple tr elements and is typically used to display column headers and other header information.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple table header Thead simple = thead( tr( th("Name"), th("Age"), th("City") ) ); // Table header with styling Thead styled = thead( tr( th("Product"), th("Price"), th("Stock") ) )._class("table-header"); // Table header with multiple rows Thead multiple = thead( tr( th("Contact Information").colspan(2), th("Address").colspan(2) ), new Tr() .children( new Th().children("Name"), new Th().children("Phone"), new Th().children("Street"), new Th().children("City") ) ); // Table header with sorting Thead sortable = new Thead() .children( new Tr() .children( new Th().sorted("asc").children("Name"), new Th().sorted("desc").children("Date"), new Th().children("Status") ) ); // Table header with accessibility Thead accessible = new Thead() .children( new Tr() .children( new Th().scope("col").children("ID"), new Th().scope("col").children("Description"), new Th().scope("col").children("Amount") ) );

See Also: