Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Numbering List

Jump to bottom
Olivier Nizet edited this page May 13, 2025 * 2 revisions

Numbering lists are ol and ul tags. Nested lists are supported, with a maximum of 8 depths (limitation of MS Word).

List Styles

Standard

Those are the W3C list types supported.

  • decimal
  • disc
  • square
  • circle
  • upper-alpha and lower-alpha
  • upper-roman and lower-roman
  • upper-greek and lower-greek

Alternatively, you can use the type attribute:

    Tiered numbering

    Numbering on headings (i.e., 1.1, 1.2, 2.1, ...) are automatically detected and we apply a non-standardised list style: decimal-tiered. You may also use this value on your lists.

    To disable the detection on headings, turn this flag off:

    converter.SupportsHeadingNumbering = false;

    Reset or override first number

    By default, the numbering continues between 2 consecutive lists. If you want to reset the incremental of the next list -or- if you want to start on a defined value, you can use the attribute start on the ol tag.

    <ol start="0"><li>Itemli>ol>
    <ol start="50"><li>Itemli>ol>

    To globally always reset the numbering, you can just opt-out this flag:

    HtmlConverter.ContinueNumbering = false;

    Nested tables

    Tables inside a nested list are also aligned to respect the list hanging.

    <ol>
    <li>Item 1
    <table><tr><td>Cell1td>tr>table>
    <ol>
    <li>Item 1.1
    <table><tr><td>Cell1.1td>tr>table>
    li>
    ol>
    li>
    ol>

Clone this wiki locally