<tag>

Renders enclosed text as an opening tag, `< >`

<tag> is a Paragraph Markup component that wraps its enclosed text in opening-tag delimiters (< ... >), rendering as <p> would appear written in source. Use it to refer to component tags in prose without DoenetML trying to parse them.

It has two siblings for the other tag shapes:

  • <tage> — self-closing form, e.g. <image/>.
  • <tagc> — closing form, e.g. </p>.

Using these components rather than literal < / > characters keeps the prose well-formed and lets the renderer style the names consistently.

Attributes and Properties

Attributes for <tag>

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 <tag name="t">

Other (5)
$t.disabled

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

$t.fixed

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

$t.fixLocation

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

$t.hidden

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

$t.text

text. The combined text content of this component's children, with optional begin/end delimiters.

Common to all components (4)
$t.doenetML

text. The DoenetML source code that produced this component.

$t.hide

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

$t.isResponse

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

$t.styleNumber

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

Examples

Example: Use the tag-family components for correct rendering

The author’s intention is to describe the use of the <p> and <image/> tags in writing HTML. <tag> renders the opening form, <tagc> the closing form, and <tage> the self-closing form (each linked in the intro above).