Any webpage that is loaded in the browser can be represented by the Document interface. This serves as an entry point to the DOM tree and the DOM tree contains all elements such as <body> , <title>, <table> ,<a> etc.
We can create a Document object using the Document() constructor. There are many properties of these Document object. One of such property is links. The links property gives us a collection of all <area> elements and <a> elements in a document. One more property is the length property. The length property tells us the number of links present in the document.links array. So, the document.links.length statement gives us the number of links present in a document.
- What is the difference between display: inline and display: inline-block in CSS?
- DOM (Document Object Model)
- How to convert a PDF document to a preview image in PHP?
- CSS | Links
- HTML | Links
- HTML | DOM links Collection
- CSS | Display property
- How Facebook Display Ads for something you searched
- Display Property in Bootstrap with Examples
- HTML | DOM Style display Property
- How to display HTML tags as plain text using PHP
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.