HomeWeb utilitiesHTMLHTML Image Link
HTML reference

HTML Image Link

HTML image link code.

How to make an image a link.

HTML image link code

[](../html-link.htm)

Or better use css styling to determine the width and height.

[](../html-link.htm)

The code will create this link:

								[![diagram](/web/html/flower.jpg)](../html-link.htm)
							


							

							

The code has the following parts:

  • is the link tag.

  • href attribute sets the URL to link to.

  • is the image start tag.

  • src attribute sets the image file.

  • title attribute sets the image tooltip text.

  • alt is the image tag alt text attribute.

  • style attribute sets with css the width and height of the image.

  • is the link end tag.