Anchor Links are links that link to a specific part of a page. These are useful when you want the user to easily skim-read through a page or when the page is long, or both. Wikipedia, like many other websites, uses anchor links as you can see in the following video: You need two HTML elements for Linking to a specific part of the page - the link itself and the page section marked by what we call a named anchor. Anchor Link We create the hyperlink using the HTML <a> tag with the href attribute linking containing #anchor-name . The # tells the browser that this is an anchor link <a href="#anchor-name">Anchor Link</a> Page Section Anchor We can mark any part of the page by providing id attribute to any of the elements. Usually, we create anchor links to headings as they section the page into various parts but you can create named anchors for any elements. <h2 id="anchor-name">Heading</h2> Do remember id by definition have to be uniq
A resource for learning PHP, HTML, CSS, JavaScript, C++, etc.