HTML TUTORIAL FOR BEGINNERS PART 4

a (anchor) elements can also be used to create internal links to jump to different sections within a webpage.

To create an internal link, you assign a link's href attribute to a hash symbol # plus the value of the id attribute for the element that you want to internally link to, usually further down the page. You then need to add the same id attribute to the element you are linking to. An id is an attribute that uniquely describes an element.

Below is an example of an internal anchor link and its target element:
```
<a href="#contacts-header">Contacts</a>
...
<h2 id="contacts-header">Contacts</h2>
```
When users click the Contacts link, they’ll be taken to the section of the webpage with the Contacts header element.
Demo
Click here

--

--

--

I am a web developer who writes web development content for you to make web development easier

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Can not use 'secp256k1' which is common on Crypto Currency to create JWT

Algorithms 101: Can Place Flowers in JavaScript

How to fix Elementor Image Carousel widget autoplay after un-hiding container

Building a Progressive Blog App with Apollo and Cosmic JS

Newtonsoft Json Deserialize C# Example

How To Manage Sessions in Node.js Using Passport, Redis, and MySQL

How to manage sessions in Node.js using Passport, Redis, and MySQL

XSS through base64 encoded JSON

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmadullahnikzad

Ahmadullahnikzad

I am a web developer who writes web development content for you to make web development easier

More from Medium

Tips to get FreeCodeCamp Responsive Web Design certificate faster

A To-do List HTML & CSS (Pt.1)

100 Days Of Code #3

My (Beginner) Experience With Flex and Grid Layout

Boxes