<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
Attributes for <table>
Other (2)
boolean. Default value: true. Whether to display an auto-generated table number.
boolean. Default value: false. Whether to omit the auto-generated table name from the title.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <table name="t">
Other (7)
$t.disabledboolean. Whether this component is disabled and cannot be interacted with.
$t.fixedboolean. Whether this component's value is fixed and cannot be modified.
$t.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$t.tableEnumerationtext. Auto-generated number for this table.
$t.tableNametext. The full display name of the table (e.g., 'Table 2').
$t.titletext. The table's title.
Common to all components (4)
$t.doenetMLtext. The DoenetML source code that produced this component.
$t.hideboolean. Whether to hide this component from the rendered output.
$t.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$t.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
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 Examples
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.