1. HTML – Images and sounds
By
Dr. I. Uma Maheswari
iuma_maheswari@yahoo.co.in
2. Images and sound
• Adding images to the html document will
arose a sense of interest to the end user.
• Including graphics in page will make the
page more attractive.
• HTML provides, a unique way to include
any type of graphics file into the
document, but many of the browsers
supports only GIF (Graphics Interchange
Format) and JPEG (Joint Photographic
Expert Group) files.
3. Image Tag
• The tag used to display an image on HTML
document is <IMG> tag.
Attributes of <IMG> tag
• SRC – source (refers to the filename of an
image)
• ALT – alternative message
• Align – alignment ( right, left or center)
• Height – height of the picture in pixels
• Width – width of the picture in pixels
4. Example for adding image
<HTML>
<HEAD>
<TITLE> adding image to a web page </TITLE>
</HEAD>
<BODY>
<H1>baby<HI>
<IMG SRC = “G: images.jpeg”
alt = Picture of a baby
align = “center”
Width = “85”
Height = “85”>
</BODY>
</HTML>
5. Background picture
• The background attribute of the <body>
tag is also used to add a background
image to a document.
Eg., <body background = “c:windowsclouds.bmp”>
• The image file “clouds.bmp” will be
displayed as a background image for the
web page.
6. Adding sounds
• The sound files are stored either in wave
format (.wav) or basic audio format (.av) or
midi format (.mid).
• <bgsound> tag is used to add sound.
• The attributes are SRC and LOOP
• The loop specifies the number of time the
sound has to be repeated.
Eg., <bgsound src = “c:windows media Canyon.mid” loop = “2”>