- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use an image as a link in HTML?
59 Lectures 8.5 hours
68 Lectures 8 hours
To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image. With that, also add the height and width.
You can try to run the following code to use an image as a link in HTML
<!DOCTYPE html> <html> <head> <title>HTML Image as link</title> </head> <body> The following image works as a link:<br> <a href="https://www.qries.com/"> <img alt="Qries" src="https://www.qries.com/images/banner_logo.png" width=150" height="70"> </a> </body> </html>
- How to use an Image as a button in Tkinter?
- How to specify an image as a client-side image-map in HTML?
- Set an image as a server-side image map in HTML?
- How to use an animated image in HTML page?
- How to save HTML Canvas as an Image with canvas.toDataURL()?
- How to use an image in a webpage?
- How to use Python Regular expression to extract URL from an HTML link?
- How to use floating image in HTML page?
- How to display an image in HTML?
- How to Insert an Image in HTML Page?
- How to make an image responsive in HTML?
- How to create a bookmark link in HTML?
- How to add an image as label using JavaFX?
- How to create a download link with HTML?
- How to remove underline from a link in HTML?