Today I Learned - Rocky Kev

TIL reversing HTML lists

POSTED ON:

TAGS:

Today I learned about the reverse attribute.

<ol reversed>
<li>Apples</li>
<li>Oranges</li>
<li>Pears</li>
<li>Lemons</li>
</ol>

This will display:

  1. Apples
  2. Oranges
  3. Pears
  4. Lemons

Make it a flex-direction column-reverse, and boom --

This will display:

  1. Lemons
  2. Pears
  3. Oranges
  4. Apples

The codepen: https://codepen.io/elijahmanor/pen/zYqNxgE

REFERENCE:
via https://elijahmanor.com/blog/pun-interview


Related TILs

Tagged:

TIL Gmail has a 102KB size-limit for HTML

PLACEHOLDER

TIL how Error correction works in HTML

You never get an 'Invalid Syntax' error on an HTML page. Browsers fix any invalid content and go on.

TIL what DOCTYPE means

tl;dr: DOCTYPE declaration in the first line of the HTML file, to instruct the browser to run the code in Standard mode.