Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes...

9

Click here to load reader

Transcript of Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes...

Page 1: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

PRISM MULTIMEDIA

HTML IMAGES

Page 2: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

The img tag is used to put an image in an HTML Page

<img src="http://www.prismmultimedia.com/badge1.gif" width="120" height="90" alt="HTML Tutorials">

Page 3: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

The src attribute tells the browser where to find the image.

The width and height attributes are necessary because if they are excluded, the browser will tend to calculate the size as the image loads, instead of when the page loads, which means that the layout of the document may jump around while the page is loading.

Page 4: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

The alt attribute is the alternative description. This is an accessibility consideration, providing meaningful information for users who are unable to see the image (if they are visually impaired, for example).

Page 5: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

the img element does not enclose any content, no closing tag is required.

The most commonly used file formats used for images are JPEGs, GIFs, and PNGs. They are compressed formats, and have very different uses.

Page 6: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

To reduce download times as much as possible two of the best image compressing formats used on the web are:

GIF JPG

256 colors Unlimited colors

Can handle transparent areas Can't handle transparent areas

This format is not good at compressing photographs

Excellent for compressing photographs and complex images

In general, it is excellent for banners, buttons and clipart

In general, it is not good for banners, buttons and clipart.

Page 7: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

Adding Border to an Image

You can add a border to the image using the border setting like

<img src="http://www.prismmultimedia.com/badge1.gif" width="120" height="90" alt="HTML Tutorials“ border=“5”>

Page 8: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

Spacing Around the Image

You can easily add space over and under your images with the Vspace attribute.

<img src="http://www.prismmultimedia.com/badge1.gif" width="120" height="90" alt="HTML Tutorials“ border=“5” Vspace="10">

Page 9: Image Tags in HTML, HTML5 & CSS3 training, Web Design training Hyderabad, Web Designing classes Hyderabad – Prism Multimedia

THANK YOU