Usage
{{< th [text = "Header text"] [inner = "More content"] [class = "ui center aligned"] >}}Must be used inside tr partial for table header cells
Description
Creates an HTML th element for table header cells. These cells are semantically different from regular data cells and are typically used in thead sections or as row headers.
Parameters
indicates required parameter
text =
"string"
Primary header cell content (processed with markdownify)
inner =
"string"
Additional header cell content (processed with markdownify)
class =
"string"
CSS class names to apply to the th element
Examples
Basic table headers
{{< table >}}
{{< thead >}}
{{< tr >}}
{{< th >}}Name{{< /th >}}
{{< th >}}Role{{< /th >}}
{{< th >}}Department{{< /th >}}
{{< /tr >}}
{{< /thead >}}
{{< tbody >}}
{{< tr >}}
{{< td >}}John Smith{{< /td >}}
{{< td >}}Developer{{< /td >}}
{{< td >}}Engineering{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Headers with CSS styling
{{< table >}}
{{< thead >}}
{{< tr >}}
{{< th class="ui center aligned" >}}**Product**{{< /th >}}
{{< th class="ui right aligned" >}}**Price**{{< /th >}}
{{< th class="ui left aligned" >}}**Status**{{< /th >}}
{{< /tr >}}
{{< /thead >}}
{{< /table >}}Use CSS classes for alignment and styling, markdown for emphasis
Row headers in table body
{{< table >}}
{{< tbody >}}
{{< tr >}}
{{< th >}}**Q1 2024**{{< /th >}}
{{< td >}}$125,000{{< /td >}}
{{< td >}}15% growth{{< /td >}}
{{< /tr >}}
{{< tr >}}
{{< th >}}**Q2 2024**{{< /th >}}
{{< td >}}$140,000{{< /td >}}
{{< td >}}12% growth{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Use th for row headers to identify data categories
Headers with rich markdown content
{{< table >}}
{{< thead >}}
{{< tr >}}
{{< th >}}
**API Endpoint**
[Documentation](./api-docs)
{{< /th >}}
{{< th >}}
**Status**
*Last checked*
{{< /th >}}
{{< /tr >}}
{{< /thead >}}
{{< /table >}}Multi-line markdown content works in header cells
Headers with included content
{{< table >}}
{{< thead >}}
{{< tr >}}
{{< th >}}Configuration{{< /th >}}
{{< th >}}{{<hw t="include" from="config-header.md">}}{{< /th >}}
{{< /tr >}}
{{< /thead >}}
{{< /table >}}Include external content in headers for dynamic documentation
Additional Information