Command the DOM: 15 levels of querySelector, createElement, insertBefore and mutation. A pro-level JavaScript DOM manipulation game.
The DOM (Document Object Model) is the representation of an HTML page as JavaScript objects. You can access an element with document.getElementById() then change its properties.
document.querySelector() finds the first element matching a CSS selector. More flexible than getElementById because it can use class, tag, attribute selectors, etc.
Every DOM element has a .style property to change inline CSS. CSS property names use camelCase in JavaScript (background-color → backgroundColor).
.innerHTML lets you insert an HTML string into an element. Different from .textContent, which only inserts plain text (without parsing HTML).
.classList provides methods to manage an element's CSS classes: .add(), .remove(), .toggle(), .contains().
.setAttribute(name, value) sets an HTML attribute on an element. For standard attributes, you can also access them directly as a property (el.href, el.src, etc).
And more, 15 levels in all.