Learing A Bast Mobile And Computer Tip And Tricks Information Technology ect...

Breaking

Post Top Ad

Your Ad Spot

Sunday 9 July 2017

HTML a Tag


Example

A link to nsinformations.blogspot.com:
<a href="https://nsinformations.blogspot.com/">Visit nsinformations.blogspot.com!</a>
Try it Yourself »
More "Try it Yourself" examples below.

Definition and Usage

The <a> tag defines a hyperlink, which is used to link from one page to another.
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.
By default, links will 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

Differences Between HTML 4.01 and HTML5

In HTML 4.01, the <a> tag could be either a hyperlink or an anchor. 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 HTML 4.01 attributes are no longer supported.

Attributes

= New in HTML5.
AttributeValueDescription
charsetchar_encodingNot supported in HTML5.
Specifies the character-set of a linked document
coordscoordinatesNot supported in HTML5.
Specifies the coordinates of a link
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_nameNot supported in HTML5. Use the global id attributeinstead.Specifies the name of an anchor
relalternate
author
bookmark
external
help
license
next
nofollow
noreferrer
noopener
prev
search
tag
Specifies the relationship between the current document and the linked document
revtextNot supported in HTML5.
Specifies the relationship between the linked document and the current document
shapedefault
rect
circle
poly
Not supported in HTML5.
Specifies the shape of a link
target_blank
_parent
_self
_top
framename
Specifies where to open the linked document
typemedia_typeSpecifies the media type of the linked document

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Archive Post