Interview Question

What is the use of href?

Href tells a link where to go.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The `href` attribute sets the destination of a link. β€’ It is written inside an element’s opening tag. β€’ The HTML Standard limits which elements may use it and which values are valid. β€’ Browsers apply the attribute when they process the element or the resource it controls.

💡 Simple Example

<a href="/about.html">About</a>

⚡ Quick Revision

Href tells a link where to go.