How to use ol li and table side by side with no html validation error?
Solution 1:
Use counter CSS on first cell of each row then you style.
Selector: tr :first-child
should be okay .
more about CSS COUNTER: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Counters
Solution 2:
GCyrillus is right: I create a CSS counter "mycount" and then I use a class attribute every time I want to print.
Here The CSS code:
<style type="text/css">
body {
counter-reset: mycount; /* Set the counter to 0 */
}
.mycount:before{
counter-increment: mycount; /* Increment the counter */
content: counter(mycount) ". "; /* Display the counter */
}
</style>
And the html table:
<table>
<tr>
<td><span class="mycount"></span></td>
<td>Snow Partridge</td>
<td>लरवान</td>
<td>Chinese Version</td>
</tr>
<tr>
<td><span class="mycount"></span></td>
<td>Tibetan Snowcock</td>
<td>कोङ्मा हिउकुखुरा</td>
<td>Chinese Version</td>
</tr>
</table>