<div>
<div> is a Sectional
component that groups doenetML content into an unformatted container that can be named.
A <div> does not start a count of its own: a
<section> or other numbered sectional component inside it is
numbered along with the ones beside the <div>, and the count continues
after it.
Attributes and Properties
Attributes for <div>
Scoring (10)
aggregateScoresboolean. Default value: false. Whether to aggregate scores of scored descendants into a section credit-achieved value.
colorAnswersSeparatelyAdded in 0.7.21boolean. Default value: false. When section-wide check work is enabled, color each answer based on its own correctness rather than the section's overall credit.
colorCorrectnessAdded in 0.7.4boolean. Default value: true. Whether to color-code the answers it contains based on correctness.
displayDigitsForCreditAchievedinteger. Default value: 3. Number of significant digits to display for the credit achieved value.
maxNumAttemptsAdded in 0.7.21integer. Default value: Infinity. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.
sectionWideCheckWorkboolean. Default value: false. Whether to show a single section-wide check-work button instead of per-answer buttons.
showCorrectnessboolean. Default value: true. Whether to display correctness indicators for the answers it contains.
submitLabeltext. Default value: Check Work. Label for the section-wide submit button when correctness is shown.
submitLabelNoCorrectnesstext. Default value: Submit Response. Label for the section-wide submit button when correctness is not shown.
weightnumber. Default value: 1. Relative weight of this section when aggregated by an enclosing scored section.
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 <div name="d">
Scoring (9)
$d.aggregateScoresboolean. Whether scores of scored descendants are aggregated into this section's credit value.
$d.colorCorrectnessAdded in 0.7.22boolean. Whether the answers this section contains are color-coded by correctness, after combining the attribute with any enclosing section's setting and with whether correctness is shown at all.
$d.displayDigitsForCreditAchievedinteger. Number of significant digits to display for the credit achieved value.
$d.maxNumAttemptsAdded in 0.7.21integer. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.
$d.sectionWideCheckWorkboolean. Whether to show a single section-wide check-work button instead of per-answer buttons.
$d.showCorrectnessAdded in 0.7.22boolean. Whether correctness is shown for the answers this section contains, after combining the attribute with any enclosing section's setting and with the activity-wide flag.
$d.submitLabeltext. Label for the section-wide submit button when correctness is shown.
$d.submitLabelNoCorrectnesstext. Label for the section-wide submit button when correctness is not shown.
$d.weightnumber. Relative weight of this section when aggregated by an enclosing scored section.
Other (4)
$d.creditAchievednumber. Aggregate credit achieved (between 0 and 1) for scored descendants of this section.
$d.numAttemptsLeftAdded in 0.7.21integer. Remaining number of section-wide submissions before the maximum is reached.
$d.numSubmissionsAdded in 0.7.21integer. Number of times the section-wide check-work button has been submitted.
$d.percentCreditAchievednumber. Aggregate credit achieved as a percentage (between 0 and 100).
Common to all components (8)
$d.disabledboolean. Whether this component is disabled and cannot be interacted with.
$d.doenetMLtext. The DoenetML source code that produced this component.
$d.fixedboolean. Whether this component's value is fixed and cannot be modified.
$d.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$d.hideboolean. Whether to hide this component from the rendered output.
$d.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$d.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: <div> as a general container element
A <div> can be used to group portions of
content that are to be collectively hidden or copied.