Images (1) • Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) – img element with attributes: • src attribute : Specifies the location of the image file • width and height attributes: Pixels (“picture elements”) • alt attribute : the text will be displayed if the browser could not display the image.
18
Embed
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Images (1)
• Three most popular formats– Graphics Interchange Format (GIF)– Joint Photographic Experts Group (JPEG)– Portable Network Graphics (PNG)– img element with attributes:
• src attribute : Specifies the location of the image file• width and height attributes: Pixels (“picture elements”)• alt attribute : the text will be displayed if the browser could not display
the image.
• HTML The <img> Tag and the Src Attribute• Syntax for defining an image:• <img src="url" alt="some_text"/>• <img src="boat.gif" alt="Big Boat" />
•
Insert an image from another folder or another server
Align an image within the text
Use an image as a link.
Creating and Using Image Maps (1)
• Designate certain areas of an image (called hotspots) as links– Element map• Attribute id identifies the image map
– Element img • Attribute usemap refers the map by id.