Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerHTML vs textContent vs innerText
innerHTML vs textContent vs innerText test case
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
innerHtml
14.4M/s
textContent
7.4M/s
innerText
1.5M/s
View exact numbers
Test name
Executions per second
✓
innerHtml
14,440,818 Ops/sec
textContent
7,376,078 Ops/sec
innerText
1,540,668 Ops/sec
HTML Preparation code:
<div id='hello'>Hello, World!</div>
Script Preparation code:
var el = document.getElementById('hello');
Tests:
innerText
el.innerText = "Goodbye, cruel world!"
innerHtml
el.innerHtml = "Goodbye, cruel world!"
textContent
el.textContent = "Goodbye, cruel world!"