create h1 element javascript dom code example Example: n JavaScript, select your element and give it some text var title = document.getElementById(‘header-title’);