IT. Expert System.

HTML

a


Tag Description

The a tag is used to define a hyperlink, which is used to link from one page to another.

This tag has the form:

<a href="URL">
  link text
</a>

By default, links appear as follows in all browsers:

  • An unvisited link is underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red

HTML5 and HTML4.01 Differences

In HTML4.01, the <a> tag could be either a hyperlink or an anchor. This was determined by the href attribute. In HTML5, the <a> tag is always a hyperlink, but if it has no href attribute, it is only a placeholder for a hyperlink.

HTML5 has some new attributes, and some HTML4.01 attributes are not supported in HTML5.

HTML5   = New for HTML5

Attributes

Attribute Value Description
charset char_encoding Specifies the character encoding of the linked document
HTML4: supported in html4.01
HTML5: not supported in html5
coords coordinates Specifies the coordinates of a link
HTML4: supported in html4.01
HTML5: not supported in html5
downloadHTML5 filename Specifies that the target will be downloaded when a user clicks on the hyperlink
href URL The target URL of the link
hreflang lang_code Specifies the base language of the target URL

Use only if the href attribute is present.
mediaHTML5 media query Specifies what media / device the target URL is optimized for.
Use only if the href attribute is present (default = all).
name section_name Specifies the name of an anchor
HTML4: supported in html4.01
HTML5: not supported in html5
rel alternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
Specifies the relationship between the current document and the target URL. Use only if the href attribute is present.
rev text Specifies the relationship between the linked document and the current document
HTML4: supported in html4.01
HTML5: not supported in html5
shape default
rect
circle
poly
Specifies the shape of a link
HTML4: supported in html4.01
HTML5: not supported in html5
target _blank
_parent
_self
_top
Specifies where to open the linked document. Use only if the href attribute is present.
  • _blank - the target URL will open in a new window
  • _self - the target URL will open in the same document as it was clicked
  • _parent - the target URL will open in the parent document
  • _top - the target URL will open in the full body of the window
type media_type Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL. Use only if the href attribute is present.

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<a href="http://www.808apps.com">
  Visit our website!
</a>

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 2
Empty Tag: No


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 11881 / 248549998. Delta: 0.02317 с