alert(document.getElementsByTagName("a")[0]); alert(document.getElementsByTagName("a")[0].getElementsByTagName("p")[0]);