The ping
attribute on an <a> tag will send a short notification to the specified URL when the link is clicked.
This is useful for tracking web page links.
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 <a ping="https://google.com"
href="https://microsoft.com/"
target="_blank">Microsoft</a>
and ping Google.
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.
<a href="URL" ping="list-of-URLs" />
Note: The href value is required for ping to work.
Value | Description |
---|---|
list-of-URLs | A space-separated list of URLs. |
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 |
Back to <a>