Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

Print Version

HTML Picture Codes

You can use the following HTML code to embed a picture into your HTML document. The code uses the <img> tag, which is the official tag to use for embedding pictures on web pages.

You can also check out the HTML images section of the HTML Tutorial.

Example Picture Code

This code results in:

Milford Sound in New Zealand

More Picture Codes

Here are links to more picture codes. You can do things like hyperlink images or add a border around your picture. You can even create a rollover effect whenever you hover over the image.

  • Image Links - Opens a web page whenever the user clicks on your picture.
  • Image Maps - These are "clickable" hotspots on your image. One picture can link to many different web pages.
  • Picture Borders - Adds a border around your picture.
  • Image Rollovers - Creates that "Hover over" effect. Easier than you might think!

Picture Code Template

You can use the following template as a basis for your HTML picture codes. Simply fill in the blanks or remove uneeded 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?

  • Share
  • Add this page to your Favorites
  • Link to this page (copy/paste into your own website or blog):
  • Link to Quackit using one of these banner ads.
  • Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

© Copyright 2000 - 2010 Quackit.com