<table>
<table> is a Sectional
component that serves as a container element for data rendered
in a <tabular> format. Much of the DoenetML for customizing the appearance
of a table occurs in its <tabular>, <row>, or <cell> children.
Attributes and Properties
| Attribute | Type | Values |
|---|---|---|
number = "…" | "true" "false" | |
suppressTableNameInTitle = "…" | "true" "false" |
| Property | Type |
|---|---|
$t.disabled | boolean |
$t.fixed | boolean |
$t.fixLocation | boolean |
$t.hidden | boolean |
$t.tableEnumeration | text |
$t.tableName | text |
$t.title | text |
Example: <table> without attributes
In the sample code above, the <table> component is used without any additional attributes specified.
Example: <table> with dividing lines
In order to render dividing lines inside a <table>, the relevant border attributes, top, bottom, left, and right are specified in either the <tabular>, or <row> children.
Example: <table> with varying widths
Tables with varying widths are constructed by adjusting the colSpan attribute within the <cell> components.
Example: <table> with thick line below header only
To render a thicker line below the header row, use the bottom attribute with the medium or major specification within the <row> component.
Attribute Example: number
In the sample code above, the <table> component is used in combination with the number attribute set to false, which removes the default numbering for a table.
Attribute Example: suppressTableNameInTitle
In the sample code above, the <table> component is used in combination with the suppressTableNameInTitle attribute set to true, which results in a table with only the user-defined title rendered.