<html>
<body>
<h1>The HTMLCollection Object</h1>
<h2>The length Property</h2>
<p>The tags in this document are:</p>
<p id="demo"></p>
<script>
const elements = document.getElementsByTagName("*");
let text = "";
for (let i = 0; i < elements.length; i++) {
text += elements[i].tagName + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>