HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

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

925. HTML Tutorial
HTML Tutorial for beginners - Learn HTML to develop your website in simple and easy steps starting from basic to advanced concepts with examples including overview, basic tags, meta tags, attributes, formatting, phrase tags, comments, fonts, marquees, i
https://www.tutorialspoint.com/html/

2657. Images : Resizing - HTML Tutorial
HTML images - HTML tutorial
http://www.echoecho.com/htmlimages03.htm

2672. Links : Links in Framesets - HTML Tutorial
HTML links - HTML tutorial
http://www.echoecho.com/htmllinks09.htm

2690. Text : Text Links - HTML Tutorial
HTML basics - HTML tutorial
http://www.echoecho.com/htmltext03.htm

2189. HTML Tutorial - Eingabe-Tag, Text, Passwort, Checkbox, Option, absenden, Reset
Eingabe-Tag-Nutzung. Warum ist der Input-Tag so nützlich, um ein Formular zu erstellen.
https://tutorialehtml.com/de/html-eingabe-tag/

3196. How to create HTML link without underline, html tutorial
How to create HTML link without underline html tutorial
https://www.agernic.com/html-tutorial/How-to-create-html-link-without-underline.html

Your add here
PHP strrchr() Function

PHP ucwords() function

PHP count() Function

PHP htmlentities() function

PHP str_split() function

PHP isset() Function

PHP ltrim() function

PHP printf() function

PHP strtolower() function

PHP htmlspecialchars_decode() function

PHP ucfirst() function

PHP lcfirst() function

PHP md5() function

PHP trim() function

PHP strip_tags() function

PHP html_entity_decode() function

HTML - Elements: body, head, title
HTML Headings, examples
Basic Syntax of CSS - How to Code CSS
HTML Font Size
PHP Array - What is an Array?
PHP 5 Constants