Define the initial value <OL>

Based on the post I found in the <OL> Ordered Lists, Starting Index Using XHTML Strict? I was wondering if there is a way to determine the beginning of the list value without using CSS and still be compatible according to the strict DTD specification? I am also looking for a solution to the value attribute assigned to the tag li.

Is it possible to start only with a numerical value? Can I start with a specific alphabet, for example?

+3
source share
2 answers

the right way:

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

correct but outdated

<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>
+3
source

, <ol start="5">, . , , .

type, , , , start, .

type value, value , . , , .

CSS. CSS style, .

+2

Source: https://habr.com/ru/post/1768544/


All Articles