<html>
<body>
<h1>The Document Object</h1>
<h2>The links Property</h2>
<p><a href="../html/default.html">HTML Tutorial</a></p>
<p><a href="../css/default.html">CSS Tutorial</a></p>
<p>The URL of the first link in the document is:</p>
<p id="demo"></p>
<script>
let url = document.links.item(0).href;
document.getElementById("demo").innerHTML = url;
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_links4 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:39 GMT -->
</html>