Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>
<a href="../html/default.asp.html">HTML</a>
<br>
<a href="../css/default.asp.html">CSS</a>
</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"Number of links: " + document.links.length;
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy