HTML limits you to a signed 32-bit int in ordered lists

HTML allows you to specify a starting number from which an ordered list (<ol>) should start. I thought “Is there an upper bound?”.

Turns out: Yes, there is. It’s 2147483647 (i.e. 231-1 ). Looks like a signed 32-bit integer to me.

<ol start=2147483645>
    <li>I am still in order</li>
    <li>As am I</li>
    <li>Me too</li>
    <li>💥 Limit reached</li>
    <li>💥 Limit reached</li>
    <li>💥 Limit reached</li>
</ol>

The above snippet will render as the following:

  1. I am still in order
  2. As am I
  3. Me too
  4. 💥 Limit reached
  5. 💥 Limit reached
  6. 💥 Limit reached
Licensed under MIT
Built with Hugo
Theme Stack designed by Jimmy