References

Collection of references for web development.

HTML a tag

Description

The HTML <a> (anchor) element is used for creating hyperlinks to websites, files, or locations on a document.

Attributes

Attribute Value Description
download filename Download a URL instead of navigating to it.
href URL Determines the URL to where the link will point to or the name of the anchor.
hreflang language_code The language code for the destination URL.
ping URLs Notifies the list of specified URLs with a short HTTP POST, used typically for tracking.
rel alternate
author
bookmark
canonical
external
help
icon
license
manifest
next
nofollow
noopener
noreferrer
pingback
prefetch
preload
prev
search
shortlink
stylesheet
tag
Specifies the relationship between the current and target documents.
target _self
_blank
_parent
_top
framename
Specifies where to display the URL.
type MIME type Specifies the media type for the URL.

Example

<a href="https://codeshack.io/">CodeShack</a>

Example #2

<a href="https://codeshack.io/" target="_blank">
	<img src="https://codeshack.io/web/img/alogo.png" width="150" height="50">
</a>

More Examples