<li>

A list item within `<ol>` / `<ul>`

<li> is a Sectional component that defines an item in either an ordered list, <ol>, or an unordered list, <ul>.

Attributes and Properties

Attributes for <li>

Scoring (9)
aggregateScores

boolean. Default value: false. Whether to aggregate scores of scored descendants into a section credit-achieved value.

colorCorrectness

boolean. Default value: false. Whether to color-code answers in this section based on correctness.

displayDigitsForCreditAchieved

integer. Default value: 3. Number of significant digits to display for the section's credit achieved value.

forceIndividualAnswerColoring

boolean. Default value: false. Whether to force per-answer color-correctness even when section-wide check work is enabled.

sectionWideCheckWork

boolean. Default value: false. Whether to show a single section-wide check-work button instead of per-answer buttons.

showCorrectness

boolean. Default value: false. Whether to display correctness indicators for answers in this section.

submitLabel

text. Default value: Check Work. Label for the section-wide submit button when correctness is shown.

submitLabelNoCorrectness

text. Default value: Submit Response. Label for the section-wide submit button when correctness is not shown.

weight

number. Default value: 1. Relative weight of this section when aggregated by an enclosing scored section.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <li name="l">

Scoring (6)
$l.aggregateScores

boolean. Whether scores of scored descendants are aggregated into this section's credit value.

$l.displayDigitsForCreditAchieved

integer. Number of significant digits to display for the section's credit achieved value.

$l.sectionWideCheckWork

boolean. Whether to show a single section-wide check-work button instead of per-answer buttons.

$l.submitLabel

text. Label for the section-wide submit button when correctness is shown.

$l.submitLabelNoCorrectness

text. Label for the section-wide submit button when correctness is not shown.

$l.weight

number. Relative weight of this section when aggregated by an enclosing scored section.

Other (7)
$l.creditAchieved

number. Aggregate credit achieved (between 0 and 1) for scored descendants of this section.

$l.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$l.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$l.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$l.hidden

boolean. Whether this component is hidden from the rendered output.

$l.percentCreditAchieved

number. Aggregate credit achieved as a percentage (between 0 and 100).

$l.text

text. The list's content rendered as plain text.

Common to all components (4)
$l.doenetML

text. The DoenetML source code that produced this component.

$l.hide

boolean. Whether to hide this component from the rendered output.

$l.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$l.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <ul> with nested <li>

<ul> renders an unordered list, with list items given by <li> children. <ul> is a block component and should not contain any components other than <li> children. Individual <li> children may themselves contain graphs, problems, paragraphs, and other content.


Example: <ol> with nested <li>

<ol> renders an ordered list, with list items given by <li> children. <ol> is a block component and should not contain any components other than <li> children. Individual <li> children may themselves contain graphs, problems, paragraphs, and other content.


Example: <li> with more content

<ul> and <ol> components can only take <li> children. Individual <li> children may themselves contain graphs, problems, paragraphs, and other content.