Is it possible to refer to a <li>
index? I want to do that to be able to add/remove/reorder the <li>
tags without having to manually change the reference number.
Here is an example with some made-up HTML that outlines how I think doing that could work:
<ol>
<li>...</li>
<li ref="some-ref">Some text that I want to refer to later ...</li>
<li>...</li>
<li>According to <liref ref="some-ref" />, ...</li>
</ol>
The desired output would of course be:
- ...
- Some text that I want to refer to later ...
- ...
- According to 2., ...
Is there something like this in real-life HTML?