Html – Define
    start value

htmlhtml-listsxhtml

Building on the post I found at Ordered Lists <OL>, Starting index with XHTML Strict?, I was wondering if there is a way to define the start value of a list without using CSS and still be compliant conforming to the strict DTD specification? I am also looking for a solution of the "value" attribute assigned to the tag li.

Can I only start with a numerical value? Am I able to commence with a specific alphabet for example?

Best Answer

correct way:

<ol>
    <li value='10'>item</li>
    <li>item</li>
    <li>item</li>
</ol>

correct, but deprecated

<ol start='20'>
    <li>item</li>
    <li>item</li>
    <li>item</li>
</ol>

ugly hack XD

<style>
    li.hidden { visibility: hidden; height: 0px; font-size: 0px;
    /* don't try with display:none, trust me */  }
</style>
<ol>
    <li class='hidden'></li>
    <li class='hidden'></li>
    <li class='hidden'></li>
    <li>item 4</li>
    <li>item 5</li>
    <li>item 6</li>
</ol>