For instance in the snippet below - how do I access the h1 element knowing the ID of parent element (header-inner div)?
&
If you are sure that there is only one H1 element in your div:
var parent = document.getElementById('header-inner'); var element = parent.GetElementsByTagName('h1')[0];
Going through descendants,as Shog9 showed, is a good way too.