Core: learn it Step 7 of 16 on the Frontend Developer roadmap

Changing the page

Change text with textContent, toggle classes with classList and create new elements with createElement. Avoid putting user input into innerHTML, which can open security holes.

Learn it on JeliScript

More in The DOM and events

See it on the Frontend Developer roadmap