AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

HTML Image Link


HTML Tutorial » HTML Image Link

To use an image as a link in HTML, use the <img> tag and the <a> tag with the href attribute. The <img> tag is for using an image on a web page, and the <a> tag is for adding a link. Under the src image tag attribute, add the URL of the image with the height and width.
To use an image as a link, put the <img> tag inside the <a> tag:

Syntax:
<a href="add_link"><img src="your_image_file" width="pixels"><a>

HTML image link code - examples


Example:
Example 1 HTML Links - Image as Link - examples:

<!DOCTYPE html>
<html>
<head>
<title>HTML Image as link code - example</title>
</head>
<body>
<h1>HTML Image as link code - example</h1>
<a href="https://www.agernic.com/html-tutorial/html-image-size.html">
<img src="https://www.agernic.com/uploads/html-img-tag.jpg" alt="html image tag"> <br />
<a/>
<h2>HTML Image link to another page - example</h2>
<a href="https://www.agernic.com">
<img src="https://www.agernic.com/uploads/html-img-tag.jpg" alt="html image tag"> <br />
<a/>

</body>
</html>


HTML Image Link with Text - examples


Image and text in link, and the site help you refers to the image.

Example:
Example 2 HTML Image Link with Text - examples:

<!DOCTYPE html>
<html>
<head>
<title>HTML Image Link with Text - examples</title>
</head>
<body>
<h1>HTML Image Link with Text - example</h1>
<a href="https://www.agernic.com/html-tutorial/html-image-size.html">
<img src="https://www.agernic.com/uploads/html-img-tag.jpg" alt="html image tag"> <br />
HTML image size <a/>
</body>
</html>


html image link with text
HTML Image Link - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.