Quackit Logo

Got a MySpace Page?

Get "www.yourname.com" for your MySpace page. Learn how >>.

HTML Image Link Code

Print Version

The following is an example of html image code. You can copy and paste this code into your own HTML documents - just change the values of the attributes as required.

For various code usage, check out the HTML links page from the HTML tutorial.

Example HTML Image Link Code

<a href="http://www.quackit.com/travel/new_zealand/milford_sound" target="_blank"> <img src="http://www.quackit.com/pix/milford_sound/milford_sound_t.jpg" width="225" height="151" alt="Milford Sound in New Zealand" /> </a>

This code results in:

Templates

You can use the following templates as a basis for your HTML image link codes. Simply fill in the blanks or remove uneeded attributes.

Link Code Template

To link an image, simply nest it inside a hyperlink tag. Here is the hyperlink tag including all possible attributes.

For an explanation of all the attributes, see the HTML a tag specifications.

<a	href=""
	name=""
	hreflang=""
	type=""
	rel=""
	rev=""
	charset=""
	shape=""
	coords=""
	target=""
	accesskey=""
	dir=""
	class=""
	id=""
	lang=""
	tabindex=""
	title=""
	style=""
	onfocus=""
	onblur=""
	onclick=""
	ondbclick=""
	onmousedown=""
	onmouseup=""
	onmouseover=""
	onmousemove=""
	onmouseout=""
	onkeypress=""
	onkeydown=""
	onkeyup="">Image goes here</a>

Link Code Template

Here is the image tag including all possible attributes.

For an explanation of all the attributes, see the HTML img tag specifications.

<img	src=""
	width=""
	height=""
	border=""
	alt=""
	class=""
	id=""
	title=""
	style=""
	dir=""
	lang=""
	ismap=""
	usemap=""
	align=""
	hspace=""
	vspace=""
	onclick=""
	ondbclick=""
	onmousedown=""
	onmouseup=""
	onmouseover=""
	onmousemove=""
	onmouseout=""
	onkeypress=""
	onkeydown=""
	onkeyup="" />

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!