html body { margin-top: 50px !important; } #top_form { position: fixed; top:0; left:0; width: 100%; margin:0; z-index: 2100000000; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; border-bottom:1px solid #151515; background:#FFC8C8; height:45px; line-height:45px; } #top_form input[name=url] { width: 550px; height: 20px; padding: 5px; font: 13px "Helvetica Neue",Helvetica,Arial,sans-serif; border: 0px none; background: none repeat scroll 0% 0% #FFF; }
Chapter 5
Chapter 5
Chapter 5
Furnishing your Web page with design doesn’t end in typography, it only starts from there. Another
good way of making your webpage attractive is thru the use of images or pictures. You can insert a
picture in your Web page through the empty tag <img>. To display the image on the page, you have
to use the src attribute.
Joint Photographic Experts Group or JPEG (or JPG) – Supports a million of colors and has the
file name extension of either jpeg or jpg. This file format is commonly used.
Compuserve Graphics Interchange Format or GIF – Supports up to 256 colors and has the file
name extension of gif. This format is commonly used and can be animated.
Portable Network Graphics or PNG – Supports a million of colors and has the file name
extension of png.
Bitmap or BMP – Supports a million of colors and has the file name extension of bmp. This
type of image is not compressed that’s why it provides the best quality for image at the cost of
file size.
1. Use an image that will not distract the text and main content of the page.
2. Do not use large image file because it will take a long time to load your page.
3. The background should not show boundaries and grids when tiled.
Adding Borders around Images
You can add border around your image and specify the border width to your image with <img
arc=”. . .” border=n>.
Adding Spaces around Images
You can add spacing between and around the images by specifying the horizontal
space using the attribute hspace=”n” and the vertical space using the attribute
vspace=”n”.
Aligning graphic to text
You can align text on the top, center of bottom of the image.
<html>
<header>
<tittle>Jemma Inc</tittle>
</header>
<body>
<font face=’’tahoma” size”5”>
<img src=”My Picture/InDesign.jpg”
Align top align=”top”>
Creative Design With Adobe Photoshop,
Illustrator, InDesign
<p>
<img src=”My Picture/InDesign.jpg”
Align top Align=”middle”>
Creative Design With Adobe Photoshop,
Illustrator, InDesign
<p>
<img src=”My Picture/InDesign.jpg”
Align top Align=”bottom”>
Creative Design With Adobe Photoshop,
Illustrator, InDesign
</font>
</body>
</html>
Wrapping text around Graphic
You can align the image to the left, right or specified portion of the picture.
<html>
<header>
<tittle>Jemma Inc</tittle>
<body>
<font face=”Tahoma” size=”3”>
<img src=”My Picture/InDesign.jpg”
Align left align=”left”>
type the contents here… . .
<br><br><br><br><br><p align=”right”>
<img src=”My Picture/InDesign.jpg”
Align right align=”right”>
type the cotents here… . .
<p>
<img src=”My Pictures/InDesign.jpg”
Align center align=”center”><br>
type the contents here… . .
</fonts>
</body>
</html>
Before you can use graphic as hyperlink you have to create the image first in Photoshop, Paint or other
program.
<html>
<header>
<tittle>Jemma Inc</tittle>
</header>
<body>
<img src=”My Pictures /JEMMA BANNER .jpg”<br>
<p>
<a href=”#”><img src=”My
Pictures/ inpg_about.jpg”></a><p>
<a href=”#”><img src=”My
Pictures/ inpg_contact.jpg”></a><p>
<a href=”#”><img src=”My
Graphic hyperlink Pictures/ inpg_downloads.jpg”></a><p>
<a href=”#”><img src=”My
Pictures/ inpg_faqs.jpg”></a><p>
<a href=”#”><img src=”My
Pictures/ inpg_inquiry.jpg”></a><p>
</body>
</html>
Creating Animated GIF Files
Before you can create animated GIF files you should create your animated image in Photoshop or other
programs that can animate images. Save the animated image as GIF and save to My Pictures.
1. Get an image or create your own image using MS paint, Photoshop or any photo editing program. In
this example, we used Photoshop.
2. Open the first image in Photoshop.
3. Drag the second image into the first image.
4. Fit the second image into the first image.
5. On the Menu Bar, click Window and click Animation.
6. The Animation window will appear at the bottom of the screen.
7. Click the Panel menu to show the menus and click Make Frames from Layers. The Animation
window will show the two images.
8. Click the first image and click the Tween icon and on the dialog box type 5 on the Frames to Add
number box and click OK.
9. On the Animation window click the second image and click the Tween icon and on the dialog box
type 5 on the Frame to Add number box and click OK.
10. Drag the first image back to the first frame.
11. Click Play to test the animation and then click Stop.
12. On the Menu Bar, click File and click Save for Web & Devices.
13. On the dialog box, click Save.
14. On the Save Optimized As dialog box, type your file name and click Save.
<html>
<header>
<tittle>Jemma Inc</tittle>
</header>
Animated GIF <body>
image <img src=”My Pictures/ JEMMA BANNER. jpg”>
<p>
<center> <img src=”My Pictures/Driggor.gif”></center>
</body>
</html>
PRACTICE
Practice adding and formatting images. Place background image and animated GIF image. Copy the
codes below. Use your own images.
II.Add <html>
background <head>
</head>
image
<body background = ‘E: \Crayons. Jpg’>
<font face=’arial bold’ size =‘7’ color=’white’>
CRAYONS
<br>RED
<br>BLUE
<br>WHITE
<br>GREEN
<br>VIOLET
<br>PINK
<br>ORANGE
<br>YELLOW
<br>BLACK
</font>
</body>
</html>
II.Add <html>
animated GIF <head>
image </head>
<img src=’E:\crayons.gif’>
</body>
</html>