<html>
<body>
<h1>The Document Object</h1>
<h2>The getElementsByTagName() Method</h2>
<a name="html">HTML Tutorial</a><br>
<a name="css">CSS Tutorial</a><br>
<a name="xml">XML Tutorial</a><br>
<p>The content of the first anchor in this document is:</p>
<p id="demo"></p>
<script>
let content = document.getElementsByTagName("a")[0].innerHTML;
document.getElementById("demo").innerHTML = content;
</script>
</body>
</html>