/    Sign up×
Reference /Pin to ProfileBookmark

The <a> tag, or Anchor element, defines a hyperlink to any URL on the web, including web pages, files, email addresses, telephone numbers, anchors on the same page – anything that a URL can address.


The most important attribute is href, which provides the address to which the element is linked.

<a href="https://webdeveloper.com/">Visit WebDeveloper.com</a>


Specifies that the targeted URL will be downloaded to the users computer. Can be used with or without a value

Provides the address to which the element is linked.

Identifies the language that the linked URL is in.

Identifies the media or device that the linked URL is optimized for.

Sends post requests with the body ping to a comma separated list of URLs when the link is clicked.

Depending on the specified value, determines how much of the referrer to send.

Depending on the specified value, specifies the relationship between the linked item and the current URL.

Determines where the linked URL is opened (current window, new window, etc.)

Provides the linked URL’s format in Mime-type.

Browser Compatibilty


User-submitted codepen.io examples of <a>


See the Pen on CodePen.


See the Pen on CodePen.

@themolitorNice! I was expecting the effects to happen on hover at first. "Fancy link" should probably say "click this fancy link" or something?
@ZalorCakeLordThat's a good idea! I didn't think of it for some reason lol.

See the Pen on CodePen.

Want to Contribute?

Submit a codepen.io link that demonstrates <a>:

to submit a demo.


Help @reference spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 9.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ

legal: ({
terms: of use,
privacy: policy
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
recent_tips: (
tipper: @ddiebold17,
tipped: article
amount: 1000 SATS,

tipper: @Mqlinka19,
tipped: live stream
amount: 4900 SATS,

tipper: @Mqlinka19,
tipped: article
amount: 10 SATS,