<a href=””> HTML Attribute

Attribute of
<a> HTML Tag
What does <a href=""> HTML Attribute do?
Specifies the linked document, resource, or location.

Code Example

<a href="https://html.com/attributes/a-href/">Learn about the a href attribute</a>

Different URL Forms

The URL may be:

Fully Qualified (include a protocol)
URL with a relative (unspecified) protocol
Browser-specific protocol
Relative to the current page
Relative to the current domain

Values of the href Attribute

Value Name Notes
url The URL (URI) of the linked resource.

All Attributes of the anchor Element

Attribute name Values Notes
hreflang Specifies the language of the linked resource.
download Directs the browser to download the linked resource rather than opening it.
target _blank
frame name
Specifies the context in which the linked resource will open.
title text Defines the title of a link, which appears to the user as a tooltip.
href url Specifies the linked document, resource, or location.
Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for href