How to specify the URL of the page the link goes to in HTML?


Use the href attribute to specify the URL of the page the link goes to in HTML.

Example

You can try to run the following code to implement href attribute −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML href attribute</title>
   </head>
   <body>
      <figure><img src = "https://www.tutorialspoint.com/videotutorials/images/tutorial_library_home.jpg"/>
         <figcaption>Tutorials Point Library of Tutorials</figcaption>
      </figure>
   </body>
</html>

Updated on: 03-Mar-2020

412 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements