Images are embedded or included in an HTML document using an
The attribute alt contains text which is shown when image gets problem in loading or somehow browser is unable to find the image. The
You can customize the size of image using
You may add title attribute and must use alt attribute for SEO (Search engine optimization) purpose.
<img src=""/>
tag. To add an image just insert this line of code in your document.
HTML
Here as you can see we used the src attribute to give the link(path) of image file.<img src="html5.png" alt="html5 logo"/>
The attribute alt contains text which is shown when image gets problem in loading or somehow browser is unable to find the image. The
alt=""
attribute should contain text value which describes the image. For examlle the following image is the logo of HTML5 hence the alt attribute is set to html5 logo. For example I have set a wrong path to image (html5.png) which is a false location, hence the alt text is being shown down hereYou can customize the size of image using
width
and height
attribute.
HTML
This will resize the image and will show<img src="html5.png" alt="html5 logo" width="300" height="300"/>
You may add title attribute and must use alt attribute for SEO (Search engine optimization) purpose.
Comments
Post a Comment