Usage
{{< table [text = "Table content"] [inner = "More content"] >}}Use with other table partials (thead, tbody, tfoot, tr, th, td) for complete table structure
Description
Creates an HTML table element that can contain table structure partials. Essential for building complex data tables with proper semantic markup. Supports markdown content and Hugo shortcodes within table cells.
Parameters
indicates required parameter
text =
"string"
Primary table content (processed with markdownify)
inner =
"string"
Additional table content (processed with markdownify)
Examples
Basic table with nested table structure partials
{{< table >}}
{{< thead >}}
{{< trth >}}Name{{< /trth >}}
{{< trth >}}Age{{< /trth >}}
{{< /thead >}}
{{< tbody >}}
{{< tr >}}
{{< td >}}John{{< /td >}}
{{< td >}}25{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Table with markdown content in cells
{{< table >}}
{{< tbody >}}
{{< tr >}}
{{< td >}}**Bold text**{{< /td >}}
{{< td >}}
- List item 1
- List item 2
{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Markdown is automatically processed in table cells
Table with included content using shortcodes
{{< table >}}
{{< thead >}}
{{< trth >}}Documentation{{< /trth >}}
{{< /thead >}}
{{< tbody >}}
{{< tr >}}
{{< td >}}{{<hw t="include" from="docs/api.md">}}{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Include external markdown files directly in table cells
Table with custom CSS classes
{{< table >}}
{{< thead >}}
{{< tr >}}
{{< th class="ui center aligned" >}}Centered Header{{< /th >}}
{{< /tr >}}
{{< /thead >}}
{{< tbody >}}
{{< tr >}}
{{< td class="ui warning" >}}Warning cell{{< /td >}}
{{< /tr >}}
{{< /tbody >}}
{{< /table >}}Use CSS framework classes for advanced styling
Additional Information