Arteqo Consulting

The European Web Agency

Design, brand and digital development


×

Arteqo Consulting Services

Contact Arteqo

×
I have read and accept the terms and conditions

a tag

The a tag, which, when implemented in the code, is written like this - <a>, is an HTML tag that belongs to link tags. Link HTML tags are used to define hyperlinks and their groups - tools that are used to navigate through the parts of a pages, different pages of a website or connect different websites.

<a> defines a hyperlink - a tool which allows users, browsers and search engine to go from one website to another, or from one part of a website to a different part of the same website. This tag is supported in the current version of HTML, which is HTML5.

Browser support

Here you can see whether <a> is supported by a certain browser, and, if yes, starting from which version it is supported.

Browser support for <a>
ChromeFirefoxEdgeOperaSafari
Is supportedIs supportedIs supportedIs supportedIs supported

Attributes and values

An attribute is a piece of additional information about a tag. While tags denote the type of objects they mark or create, attributes set the parameters of these objects. These parameters can include anything from the types of possible interactions to its visual style to its actual contents.

Values indicate how a certain attribute is actually implemented, if there is a number of ways it can happen.

What attributes are actually allowed in a certain tag depends on the tag itself. Much like possible attributes depend on a tag, possible values depend on an attribute.

The <a> tag supports the following attributes (with their respective values):

AttributeValueDescription
charsetchar_encodingSpecifies the character-set of a linked document
(Not Supported in HTML5)
coordscoordinatesSpecifies the coordinates of a link
(Not Supported in HTML5)
downloadfilenameSpecifies that the target will be downloaded when a user clicks on the hyperlink
hrefURLSpecifies the URL of the page the link goes to
hreflanglanguage_codeSpecifies the language of the linked document
mediamedia_querySpecifies what media/device the linked document is optimized for
namesection_nameSpecifies the name of an anchor
(Not Supported in HTML5)
rel
  • alternate
  • alternate
  • author
  • bookmark
  • external
  • help
  • license
  • next
  • nofollow
  • noreferrer
  • noopener
  • prev
  • search
  • tag
Specifies the relationship between the current document and the linked document
revtextSpecifies the relationship between the linked document and the current document
(Not Supported in HTML5)
  • default
  • rect
  • circle
  • poly
  • default
  • rect
  • circle
  • poly
Specifies the shape of a link
(Not Supported in HTML5)
  • _blank
  • _parent
  • _self
  • _top
  • framename
  • _blank
  • _parent
  • _self
  • _top
  • framename
Specifies where to open the linked document
media_typemedia_typeSpecifies the media type of the linked document

Global Attributes

Global attributes are HTML tag attributes that can be used by any tag, hence the name "global". They are in contrast to unique attributes that are tag-specific.

<a> supports global attributes.

Event Attributes

Event attributes are HTML tag attributes that allow triggering actions upon specific conditions, hence the name "event". Other types of attributes, namely global and unique attributes, can also trigger actions, but the difference is that even attributes allow calling scripts, such as JavaScript functions, while most other attributes only support a certain type of action.

<a> supports event attributes.