HTML and CSS Reference
In-Depth Information
By default the browser will save the file using the same filename as the file on the web server. You can, however,
change this behavior by defining a different name for the file in the content of the download attribute:
<a href="script.js" download="myscript.js">Download my JavaScript file</a>
Here I have set the filename of the downloaded file to myscript.js .
The ping Attribute
The ping attribute is used to define a URL (or a set of URLs separated by spaces) that should be notified
when a user follows the link. This is useful for applications such as visitor tracking and analytics.
<a href="" ping="">
The ping attribute is also a new addition in HTML5 and therefore browser support for this attribute is currently
Link Types
You can use a number of different link types to specify the relationship between the current page and the page that
you are linking to. You specify this relationship using the rel attribute. Most links that you create probably will not
specify a type, but you should try to use them where it is appropriate.
Table 3-1 shows the most commonly used link types, and their meanings, that are available for hyperlinks. For a full
list of link types, check out .
Table 3-1 Link Types
Link Type Purpose
alternate Links to alternative representations of a document. Use alternate to link to a copy of the page that is in
a different language, for example.
author Links to a page about the author of the document or article.
bookmark Specifies a permalink (permanent link) to the nearest section. This type can be used when linking to posts
in a blog.
help Links to a page that contains help information relevant to the content of the current page.
license Links to a page that contains a copyright license relevant to the content of the current page.
Links to the next page in a series of pages.
Used to represent that the author of the current page does not endorse the page that is being linked to.
This is commonly used by large websites such as news organizations when linking to smaller websites in
news stories.
Specifying this type of relationship also prevents search engine crawlers from following the link, hence the
name nofollow .
Instructs the browser that it is likely that the user will click this link so it should fetch the page in advance to
help speed up browsing.
Links to the previous page in a series of pages.
Search WWH ::

Custom Search