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