{ LearnWebSiteDesign.com }

HTML, XHTML CSS Tutorials and Free Website Templates

HTML Image Tutorials

HTML allows you to insert images into your web pages.

<img> Tag

The <img> tag is used to insert an image into a web page. The <img> tag does not have an ending tag.

Image src Attribute

The src attribute must be included within the <img> tag to specify the location of the image. The value of the src attribute is the location of the image that is to be displayed.

Web browsers put the image where the image tag is placed within the HTML document.

The HTML code below shows you how to insert an image into a web page.

<img src="image.jpg">

The HTML code above, in this example, would output the image below.

my litte angel:)

alt Attribute

The alt attribute is used to add alternate text for an image. The value of the alt attribute is defined by the web page creator. Web browsers will display the text value of the alt attribute if an image does not load fast enough or if the image does not load at all.

Some web browsers will display the alternate text when the mouse is hovered over the image.

People using a screen reader (for the visually impaired) will hear the alternate text in the place of the image.

<img src="image.jpg" alt="my little angel:)">

Linking Images

You can use an image as a link by placing an image within the starting <a> and the ending </a> tag.

<a href="http://learnwebsitedesign.com/"><img src="image.jpg" alt="my little angel:)"></a>

my little angel:) /

Tutorials

References

Templates

Sponsors

Advertise your web design and web development related products and services here.