HTML <a> ping Attribute

HTML a Tag Reference HTML <a> tag

Example

When the user clicks on the w3schools.com/html link, notify w3schools.com/trackpings:

<a href="http://www.w3schools.com/html" ping="https://www.w3schools.com/trackpings">


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The ping attribute works in Firefox, Chrome and Safari.


Definition and Usage

The ping attribute specifies a list of URLs to be notified if the user follows the hyperlink.

When the user clicks on the hyperlink, the ping attribute will send a short HTTP POST request to the specified URL.

This attribute is useful for monitoring/tracking.

The href attribute must be present in the <a> tag.


Differences Between HTML 4.01 and HTML5

The ping attribute is new for the <a> tag in HTML5.


Syntax

<a ping="URL">

Attribute Values

Value Description
URL Specifies the URL to be notified if the user follows the hyperlink. Must be a space separated list of one or more valid URLs

HTML a Tag Reference HTML <a> tag

SHARE THIS PAGE

COLOR PICKER

colorpicker





Search w3schools.com:

Translate w3schools.com: