Class Tbody


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

The tbody element represents a group of rows that consist of a body of data for the parent table element. It is used to group the main content rows of a table, separating them from the header (thead) and footer (tfoot) sections. The tbody element can contain multiple tr elements and is typically used to organize table data for styling and scripting purposes.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple table body with data rows Tbody simple = tbody( tr( td("John"), td("25"), td("New York") ), tr( td("Jane"), td("30"), td("Los Angeles") ) ); // Table body with styling Tbody styled = tbody( tr( td("Product A"), td("100"), td("$10.00") ) )._class("data-rows"); // Table body with multiple rows Tbody multiple = tbody( .children( new Tr() .children( new Td().children("Row 1, Col 1"), new Td().children("Row 1, Col 2") ), new Tr() .children( new Td().children("Row 2, Col 1"), new Td().children("Row 2, Col 2") ) ); // Table body with event handlers Tbody interactive = new Tbody() .onclick("handleRowClick(event)") .children( new Tr() .children( new Td().children("Clickable Row") ) );

See Also: