3rd sem comp

13
WELCOME By, Akhitha Babu Topic: HTML GRAPHICS

Upload: akhitha-babu

Post on 14-Feb-2017

27 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 3rd sem comp

WELCOMEBy,Akhitha Babu

Topic: HTML GRAPHICS

Page 2: 3rd sem comp

• Used to embed graphics in HTML pages.

• Defines an image in an HTML page.

• No ending tag.• Images are not

technically inserted into an HTML page, images are linked to HTML pages.

HTML Graphics- <IMG> tag

Page 3: 3rd sem comp

FILE FORMATSWeb graphics are generally served up in one of two formats: •GIF (short for Graphics Interchange Format)[ .gif file extension]•JPEG (short for Joint Photographic Experts Group) [.jpeg or .jpgfile extension]

Page 4: 3rd sem comp

•(src=“………”)•Instruct the browser where the server should look for the image that is to be presented to the user.•The path and filename of the image which specifies its location.•Image may be of same directory or same server or another server

srcIMG

ATTRIBUTES

Page 5: 3rd sem comp

•(alt=“string”)•Alternative content that can be displayed instead of image.•During slow connectionIncorrect src attributeScreen reader for visually impaired•This is a message displayed if the image could not be found.

altIMG

ATTRIBUTES

Page 6: 3rd sem comp

•(align=“{left| middle| right| top| absmiddle| absbottom}”)

alignIMG

ATTRIBUTES

Page 7: 3rd sem comp

•(hspace=“number”)•space between the image and the text to the left and right of it in pixels.

hspaceIMG

ATTRIBUTES

Page 8: 3rd sem comp

•(vspace=“number”)•space between the image and the text to the above and bottom of it in pixels.

vspaceIMG

ATTRIBUTES

Page 9: 3rd sem comp

•(width=“{number| percentage}”)•in pixels or percentage of the browser window width.•The width of the image. If this is not specified, the image will be the size as determined by the gif file. This can be set in pixels or a percentage

widthIMG

ATTRIBUTES

Page 10: 3rd sem comp

•(border=“number”)•in pixels• Sets a border of the specified width in pixels to be drawn around the image.

borderIMG

ATTRIBUTES

Page 11: 3rd sem comp

•(height=“{number| percentage}”)•in pixels or percentage of the browser window height.•The height of the image. •If this is not specified, the image will be the size as determined by the gif file.

heightIMG

ATTRIBUTES

Page 12: 3rd sem comp

• Embedded inside other elements such as anchors.

ie,To link an image to another document, simply nest the <img> tag

inside <a> tags.• Then the user left clicks on the image,

they will go to the designated link (rather, their browser will load a file

from the designated link).

Page 13: 3rd sem comp