HTML <a> ping Attribute

The ping attribute on an <a> tag will send a short notification to the specified URL when the link is clicked.

Example

#

A ping attribute on an <a> tag.
Clicking the link opens a Microsoft page and also sends a short HTTP post request to Google.

Go to Microsoft and ping Google.
Go to <a ping="https://google.com"
         href="https://microsoft.com/"
         target="_blank">Microsoft</a> 
and ping Google.

Using ping

The ping attribute sends a notification to one or more URLs.

This attribute sends a short HTTP POST request with the ping body to the specified URL(s).

The ping attribute is useful for monitoring or tracking links in a web page.

Note: Not all browsers support the ping attribute.


Syntax

<a href="URL" ping="list-of-URLs" />

Note: The href value is required for ping to work.


Values

#

Value Description
list-of-URLs A space-separated list of URLs.

Browser support

Here is when ping support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
Not Supported
Opera
1.0 Jan 2006
Safari
Not Supported

You may also like

 Back to <a>
Guides