<table>

The <table> component serves as a container element for data rendered in a <tabular> format. Much of the DoenetML for customizing the appearance of a table occurs its <tabular>, <row>, or <cell> children.

Attributes and Properties

Attributes for <table>
AttributeTypeValues
number = "…""true" "false"
suppressTableNameInTitle = "…""true" "false"
Props for <table name="t">
PropertyType
$t.disabledboolean
$t.fixedboolean
$t.fixLocationboolean
$t.hiddenboolean
$t.tableEnumerationtext
$t.tableNametext
$t.titletext

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.


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.


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.