Element. <!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>document.getElementById</title>
<script type="text/JavaScript">
function main() { try {
var elem = document.getElementById('out');
elem.innerHTML = "typeof(elem) = " + typeof(elem);
} catch(e) {alert (e);}
}
</script>
</head>
<body onload='main();'>
<div id='out'></div>
</body>
</html>
document.getElementsByTagName('div') returns an array of the <div> elements in a HTML document.