For instance in the snippet below - how do I access the h1 element knowing the ID of parent element (header-inner div)?
&
The simplest way of doing it with your current markup is:
document.getElementById('header-inner').getElementsByTagName('h1')[0].innerHTML = 'new text';
This assumes your H1 tag is always the first one within the 'header-inner' element.
'header-inner'