MDN self-hosted library · e01.org

Element: tagName property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<span id="born">When I was born…</span>
js
const span = document.getElementById("born");
console.log(span.tagName);