About US

User Account


HTML Images


Images can improve the design and the appearance of a web page.

HTML Images Syntax

In HTML, images are defined with the <img> tag.

The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The src attribute specifies the URL (web address) of the image:

<img src="url">


<!DOCTYPE html>

<h2>HTML Image</h2>
<img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">


The alt Attribute

The alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).

The value of the alt attribute should describe the image:


<img src="img_chania.jpg" alt="Flowers in Chania">


If a browser cannot find an image, it will display the value of the alt attribute:


<img src="wrongname.gif" alt="Flowers in Chania">

Write Reviews

Related Topics

by : Admin

131    0   

by : Admin

123    0   

by : Admin

290    3   

by : Admin

115    0   

by : Admin

224    2   

by : Admin

307    1   

Get a new website now!!

Getting a website for your small or large business is an essential way of making it grow globally.

Copyrights © 2018 Dreamsmolder.com. All rights reserved.