Skip to content
sportsLOW2026-04-28 05:15 UTC

DOM

What is getElementById()? It is used to select a single HTML element using its unique id attribute. Returns an Element object if a match is found; otherwise, it returns null. <h1 id="title">Hello</h1> let el = document.getElementById("title"); console.log(el); Output : <h1 id="title">Hello<

ADVERTISEMENT
⚡ STAY AHEAD

Events like this, convergence-verified across 689 sources, land in your inbox every Sunday. Free.

GET THE SUNDAY BRIEFING →

RELATED · sports