Sometimes you want to add `a` element to your website but still don’t know where it will link.
This is also handy when you’re changing the behavior of a link using JavaScript, which we’ll learn later.
For example the current value of href attribute is `https://www.freecodecamp.org`.

Replace href value with `#` symbol to create a dead link.
This is the most common usage of `#` that every developer use it.

```
<a href="#">Contact us</a>
```
If you have any questions and suggestions or any problem let me know in the comments section below 👇
Make sure you share ↗️ and like my story❤👍.

--

--

We learned how to add heading elements, paragraph element, image and anchor element, today it’s time to learn how to nest them within themselves.

Like example below:
```
<>...<>...</>...</>
```
If you notice we encapsulated one element within other element, let’s break it down a little bit for better understanding 👇
For example if we want to nest paragraph element inside heading elements we could do this👇
```
<h1>I am heading element<p>,but I am paragraph element encapsulated within heading elements</p></h1>
```
The above code is the general formula or method of nesting HTML elements within each other.
For if we want to convert an image into a link we could do this 👇
```
<a href="https://www.unsplash.com" target="_blank"><img src="https://www.unsplash.com/logo.png" alt="unsplash logo"></a>
```
If you have any questions or suggestions let me know in the comment section below 🗨👇👍.
Please like ❤ and share ↗️🏹

--

--

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

--

--

Ahmadullahnikzad

Ahmadullahnikzad

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