<!DOCTYPE html>
<html>
<body>
<h1>JavaScript item() Method</h1>
<p id="demo"></p>
<script>
let list = document.body.childNodes;
let txt = list.item(0).nodeName;
document.getElementById("demo").innerHTML = txt;
</script>
</body>
</html>