HTML a ping Attribute
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <a> ping Attribute

❮ HTML <a> tag

Example

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

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

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.


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Attribute
ping Yes No Yes No Yes

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