Open In App

HTML <a> ping Attribute

The HTML <a> ping Attribute is generally used to either specify a particular URL or a list of URLs that will be notified when the user will click on the hyperlink passed int HTML <a> href Attribute. This is achieved by sending a short HTTP post request to the specified URL as soon as the user clicks on the hyperlink. 

Syntax :



<a href="url_hyperlink" ping="specified_url" />

Attribute Values:

Example:






<!DOCTYPE html>
<html>
  <head> </head>
  <body>
    <h2>Welcome To GFG</h2>
    <a href=
       ping=
      Read codersaty articles
    </a>
  </body>
</html>

Output:

Note: A short HTTP post request will be sent to “https://www.geeksforgeeks.org/” whenever someone clicks  “Read codersaty articles”

Supported Browsers: 

Article Tags :