How to make an anchor tag refer to nothing with HTML?

Spread the love

Sometimes, we want to make an anchor tag refer to nothing with HTML.

In this article, we’ll look at how to make an anchor tag refer to nothing with HTML.

How to make an anchor tag refer to nothing with HTML?

To make an anchor tag refer to nothing with HTML, we can set it to a fake anchor.

For instance, we write

<a href="#"> ... </a>

to set the link’s href attribute to # to make it link to nothing.

Conclusion

To make an anchor tag refer to nothing with HTML, we can set it to a fake anchor.

Leave a Reply

Your email address will not be published. Required fields are marked *