The WYSIWYG toolbar in the SDP CMS lets you indent list items to create nested lists. (When you put your cursor on a list item, the indent buttons become available. Otherwise they are greyed-out.) The nested items have the same symbol or number format as the 'parent' list.
If you want to choose the type of list identifier (symbol or number format) and build nested lists that combine ordered and unordered items, you can do this in the source code.
Working in the source code is for advanced CMS users.
Unordered lists
- Format your list using the WYSIWYG toolbar and then click the Source button.
- Choose your list item marker from the table below and copy and paste the code snippet to replace the first tag in your list.
List style type | Value | Code example |
---|---|---|
Standard bullet | disc | <ul style="list-style-type:disc;"> |
Circle | circle | <ul style="list-style-type:circle;"> |
Square | square | <ul style="list-style-type:square;"> |
Dash | ? | <ul class="dashed"> |
Code example
<li>Oranges</li>
<li>Apples</li>
<li>Bananas</li>
<li>Grapes</li>
</ul>
How each unordered list type displays
Disc:
- Oranges
- Apples
- Bananas
- Grapes
Circle:
- Oranges
- Apples
- Bananas
- Grapes
Square:
- Oranges
- Apples
- Bananas
- Grapes
Dashes:
- Oranges
- Apples
- Bananas
- Grapes
Ordered lists
- Format your list using the WYSIWYG toolbar and then click the Source button.
- Choose your list item marker from the table below and copy and paste the code snippet to replace the first tag in your list.
The type attribute of the <ol> tag, defines the type of the list item marker:
List style type | Value | Code example |
---|---|---|
Numbers (Arabic) | 1, 2, 3 | <ol type="1"> |
Uppercase letters | A, B, C | <ol type="A"> |
Lowercase letters | a, b, c | <ol type="a"> |
Uppercase Roman numerals | I, II, III | <ol type="I"> |
Lowercase Roman numerals | i, ii, iii | <ol type="i"> |
Code example
<li>Oranges</li>
<li>Apples</li>
<li>Bananas</li>
<li>Grapes</li>
</ol>
How each ordered list type displays
Numbers:
- Oranges
- Apples
- Bananas
- Grapes
Uppercase letters:
- Oranges
- Apples
- Bananas
- Grapes
Lowercase letters:
- Oranges
- Apples
- Bananas
- Grapes
Uppercase Roman numerals:
- Oranges
- Apples
- Bananas
- Grapes
Lowercase Roman numerals:
- Oranges
- Apples
- Bananas
- Grapes
Combination lists
You can mix ordered and unordered lists and choose the list item type.
You start and end the nested list within the main list.
Create your list. Select the indented lines and click the indent button. Now go into the Source code and paste in the code snippet to replace the first line of code in the section of the list where you want to change set the list identifier type.
Code example
Note the placement of the opening and closing tags within a 'parent' list.
<li>Apples
<ul style="list-style-type:disc">
<li>Pink lady</li>
<li>Fuji</li>
<li>Granny smith</li>
</ul>
</li>
<li>Oranges</li>
<li>Bananas
<ol style="list-style-type:lower-alpha" type="a">
<li>Lady finger</li>
<li>Cavendish</li>
<li>Plantain</li>
</ol>
</li>
<li>Grapes
<ol style="list-style-type:lower-roman" type="i">
<li>Muscat</li>
<li>Sultana</li>
<li>Shiraz</li>
</ol>
</li>
</ol
>
How it displays
- Apples
- Pink lady
- Fuji
- Granny smith
- Oranges
- Bananas
- Lady finger
- Cavendish
- Plantain
- Grapes
- Muscat
- Sultana
- Shiraz
Control list counting
By default, an ordered list will start counting from 1. If you want to start counting from a specified number, you can use the 'start' attribute (eg <ol start="50">). This is useful when list numbering continues after a heading.
Code example
<li>Jessica</li>
<li>Richard</li>
<li>Marcella</li>
<li>Nadim</li>
</ol>
How it displays
- Jessica
- Richard
- Marcella
- Nadim
Reviewed 16 June 2022