How to get all the links or anchor tags from HTML documents using JavaScript?
Originally posted here!
To get all the anchor tags or links from the HTML document or the DOM, you can use the document.links property.
Let's say you have a list of many anchor tags all around your HTML document like this,
<div>
<h1>Heading 1</h1>...
melvingeorge-me.hashnode.dev1 min read