list, listItem

This element describes content that should be displayed as a list.

Usage

Enter the element in the topic and specify the type of list using the class attribute. The content of the list element is one or more listItem elements containing the content of the list items. The list items can themselves contain other MAML elements, nested lists, tables, etc. Text should be contained in a para element. The class attribute can be any of the following values:

  • bullet - A standard bulleted list of items.

  • ordered - A numbered list of items. The ordered style supports an optional start attribute that can be used to indicate the starting number for the numbered list. This lets you create a list at a later point in the topic that continues numbering from the end point of a prior list. You are responsible for providing the appropriate starting number for the new list. The start attribute is a custom attribute implemented by Sandcastle.

  • nobullet - A list of items with no symbol preceding the items.

  Note

The class attribute value is case-sensitive. Unrecognized values will default to the nobullet list style.

  Tip

The listItem element supports an address attribute that can be used to link to a specific list item from another location.

Example

 
<para>This link takes you to <link xlink:href="#SubItem2">Sub-Item #2</link>.</para>

<list class="bullet">
  <listItem><para>Item 1</para></listItem>
  <listItem><para>Item 2</para></listItem>
  <listItem><para>Item 3</para></listItem>
  <listItem><para>Item 4 - This has an nested
<codeInline>ordered</codeInline> list.</para>

  <list class="ordered">
    <listItem><para>Sub-Item 1</para></listItem>
    <listItem address="SubItem2"><para>Sub-Item 2 - This has an
<codeInline>address</codeInline> attribute and can be used as a
link target.</para></listItem>
    <listItem><para>Sub-Item 3</para></listItem>
    <listItem><para>Sub-Item 4</para></listItem>
    <listItem><para>Sub-Item 5 - This has a nested
<codeInline>nobullet</codeInline> list.</para>

    <list class="nobullet">
      <listItem><para>No-bullet item 1</para></listItem>
      <listItem><para>No-bullet item 2</para></listItem>
      <listItem><para>No-bullet item 3</para></listItem>
    </list>
    </listItem>

    <listItem><para>Sub-Item 6</para></listItem>
  </list>
  </listItem>

  <listItem><para>Item 5</para></listItem>
  <listItem><para>Item 6</para></listItem>
  <listItem><para>Item 7</para></listItem>
  <listItem><para>Item 8</para></listItem>
  <listItem><para>Item 9</para></listItem>
  <listItem><para>Item 10</para></listItem>
</list>

<para>This demonstrates the use of the custom <codeInline>start</codeInline> attribute for ordered lists.</para>

<list class="ordered">
  <listItem>
    <para>Item 1.</para>
  </listItem>
  <listItem>
    <para>Item 2.</para>
  </listItem>
  <listItem>
    <para>Item 3.</para>
  </listItem>
</list>

<para>The next list is separate but continues the numbering from the last list.</para>

<list class="ordered" start="4">
  <listItem>
    <para>Item 1.</para>
  </listItem>
  <listItem>
    <para>Item 2.</para>
  </listItem>
  <listItem>
    <para>Item 3.</para>
  </listItem>
</list>

Example Output

This link takes you to Sub-Item #2.

  • Item 1

  • Item 2

  • Item 3

  • Item 4 - This has an nested ordered list.

    1. Sub-Item 1

    2. Sub-Item 2 - This has an address attribute and can be used as a link target.

    3. Sub-Item 3

    4. Sub-Item 4

    5. Sub-Item 5 - This has a nested nobullet list.

      • No-bullet item 1

      • No-bullet item 2

      • No-bullet item 3

    6. Sub-Item 6

  • Item 5

  • Item 6

  • Item 7

  • Item 8

  • Item 9

  • Item 10

This demonstrates the use of the custom start attribute for ordered lists.

  1. Item 1.

  2. Item 2.

  3. Item 3.

The next list is separate but continues the numbering from the last list.

  1. Item 4.

  2. Item 5.

  3. Item 6.

See Also