How to add links relative to root with HTML?

Spread the love

Sometimes, we want to add links relative to root with HTML.

In this article, we’ll look at how to add links relative to root with HTML.

How to add links relative to root with HTML?

To add links relative to root with HTML, we set the href attribute to a relative path.

For instance, we write

<a href="/fruits/index.html">Back to Fruits List</a>

to set the href attribute to /fruits/index.html.

Conclusion

To add links relative to root with HTML, we set the href attribute to a relative path.

Leave a Reply

Your email address will not be published.