X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook