INSERTING GRAPHIC CONTENT IN A WEB PAGE:
How To Add Images To Your Web Pages:
By now you know enough to write a very nice, text-based home page, but it is the ability of the Web to provide pictures, technically called images, graphics, or sometimes icons, that has made it so popular. In this Primer, you'll learn how place an image on your page and also how to turn an image into a link to another page.
Placing An Image On Your Page
The command to place an image is constant. You will use the same format every time. Now might be a good time to talk about where to store everything on your web server because you're starting to call for additional items to fill up your home page. Until now, all you did was put text on the page. Now you're going to place an image.
At this point in your HTML career, it's a good idea for you to place whatever images you are going to use in a sub directory called "images".
Here's the format for placing an image:
syntax to insert an image:
<IMG SRC= "image.gif" ALT="some text" WIDTH=32 HEIGHT=32 BORDER=2>
SYNTAX EXPLANATION:
IMG: IS AN HTML ELEMENT ...WHICH USED TO INSERT AN IMAGE......
SRC: means source of the image file...it could be in directory or else in sub directory....or in a folder........
In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers directories are known as folders
Files are organized by storing related files in the same directory. In a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles a tree), a directory contained inside another directory is called a sub directory.
HEIGHT:
IT IS THE ATTRIBUTE OR PROPERTY WHICH USED TO SET HEIGHT OF THE IMAGE.....
WIDTH:
IT IS ATTRIBUTE OR PROPERTY WHICH IS USED TO SET THE WIDTH OF IMAGE......
BORDER:
IT ATTRIBUTE WHICH USED TO SET BORDER FOR THE IMAGE....
ALT:
MEANS (ALTERNATE) IS AN ATTRIBUTE WHICH USED TO DISPLAY MESSAGE IN THE BROWSERS
THAT ARE UNABLE DISPLAY PARTICULAR IMAGE......
//EXAMPLE PROGRAM ILLUSTRATING ABOUT INSERTING AN IMAGE IN TO HTML PAGE:
<HTML>
<HEAD>
<TITLE>MY WEB</TITLE>
</HEAD>
<BODY>
<img src="C:\Users\Public\Pictures\Sample Pictures\1.jpg" height=100 width=100 border=2 alt="image cannot displayed">
THIS A WONDERFUL PIC...
</BODY>
</HTML>
output:
conclusion:
*Thus simple image tag WITH ATTRIBUTES we can insert image in to html page and make it look attractive page*
No comments:
Post a Comment