Discussion on the numerical limit of the ol element in the html document

Discussion on the numerical limit of the ol element in the html document

Generally speaking, it is unlikely that you will encounter extremely large <ol> lists in HTML documents, and this article is purely a technical discussion.

I happened to come across this problem and tested it.

The measured limit is [-2147483648, 2147483647], which is [- 2^31 ~ 2^31 - 1]

There are slight differences between browsers.

In IE10 and Firefox, after the serial number reaches the maximum positive value 2147483647, the serial numbers of subsequent list items are all the same as the maximum positive value 2147483647 and remain unchanged.

2147483645.
2147483646.b
2147483647.c
2147483647.d
2147483647.e
2147483647.f

On Chrome, after the serial number reaches the maximum positive value of 2147483647, the next serial number will become the maximum negative value -2147483648, and the subsequent serial numbers will increase on this basis by -2147483647, -2147483646,...

2147483645.
2147483646.b
2147483647.c
-2147483648.d
-2147483647.e
-2147483646.f

<<:  About the startup error caused by incompatibility between vmware workstations and device/credential

>>:  How to use CSS style to vertically center the font in the table

Recommend

XHTML Getting Started Tutorial: Simple Web Page Creation

Create your first web page in one minute: Let'...

Detailed explanation of basic data types in mysql8.0.19

mysql basic data types Overview of common MySQL d...

Sample code for implementing history in vuex

I have recently been developing a visual operatio...

Six-step example code for JDBC connection (connecting to MySQL)

Six steps of JDBC: 1. Register the driver 2. Get ...

HTML table markup tutorial (15): table title

<br />This tag can be used to directly add a...

Steps to use ORM to add data in MySQL

【Foreword】 If you want to use ORM to operate data...

Solution to Mysql binlog log file being too large

Table of contents 1. Related binlog configuration...

Example of using JSX to build component Parser development

Table of contents JSX environment construction Se...

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafte...

javascript countdown prompt box

This article example shares the specific code of ...

Solution to interface deformation when setting frameset height

Currently I have made a project, the interface is ...

Solution for mobile browsers not supporting position: fix

The specific method is as follows: CSS Code Copy ...