<ul>

An unordered list

<ul> is a Sectional component that renders an unordered (bulleted) list. The <ul> component can only take <li> components (list items) as children.

Attributes and Properties

Attributes for <ul>

Scoring (10)
aggregateScores

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

colorAnswersSeparately

boolean. 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.

colorCorrectness

boolean. Default value: true. Whether to color-code the answers it contains based on correctness.

displayDigitsForCreditAchieved

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

maxNumAttempts

integer. Default value: Infinity. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.

sectionWideCheckWork

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

showCorrectness

boolean. Default value: true. Whether to display correctness indicators for the answers it contains.

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.

Other (2)

integer. Nesting level of this list (1-based).

keyword. Marker style for the list items: disc, circle, or square. Defaults to a style chosen by the list's nesting level.

ValueDescription
discA filled circle.
circleA hollow circle.
squareA filled square.
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 <ul name="u">

Scoring (9)
$u.aggregateScores

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

$u.colorCorrectness

boolean. 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.

$u.displayDigitsForCreditAchieved

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

$u.maxNumAttempts

integer. Maximum number of times the section-wide check-work button can be submitted. Once reached, all enclosed answers are disabled.

$u.sectionWideCheckWork

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

$u.showCorrectness

boolean. 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.

$u.submitLabel

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

$u.submitLabelNoCorrectness

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

$u.weight

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

Other (8)
$u.creditAchieved

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

$u.disabled

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

$u.fixed

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

$u.fixLocation

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

$u.hidden

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

$u.numAttemptsLeft

integer. Remaining number of section-wide submissions before the maximum is reached.

$u.numSubmissions

integer. Number of times the section-wide check-work button has been submitted.

$u.percentCreditAchieved

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

Common to all components (4)
$u.doenetML

text. The DoenetML source code that produced this component.

$u.hide

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

$u.isResponse

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

$u.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: <ul> with more content

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

Attribute Examples

Attribute Example: marker

The marker attribute sets the bullet style for the list items. For an unordered list the valid values are disc, circle, and square, in any capitalization; any other value is reported and ignored, and the level-based default is used instead. If unspecified, the bullet is determined by the list’s level.


Attribute Example: level

The level attribute sets the (1-based) nesting level of the list, which determines the default bullet: level 1 renders a disc, level 2 a circle, and level 3 a square, cycling for deeper levels. When a <ul> is nested inside another list, its level is computed automatically, so this attribute is typically only set to override that default.