Images&Links
Images&Links
A bit different from creating images for output on paper Six main factors distinguish them:
1.
2.
3. 4.
5.
6.
Format
Web accessed by Macs, Window-based PCs, Unix machines and etc Two most widely used formats are on the Web
GIF
JPG PNG
Color
24-bit @ true color monitor 16,777,216 colors 16-bit monitor 65, 536 colors 8-bit monitor 256 colors
Computer images are measured in PIXELS 640x480 pixels how BIG is that?
Printer at 200 ppi (pixels per inch) 3.2x2.4 inches Web the image depend on monitor 86 ppi 7.5x5.5 inches (19x14 cm)
Web page designers, tend to keep their pages under 600 pixels wide, so that viewers can see the entire contents of the page without scrolling horizontally
Speed
How can you keep download time to a minimum??? small picture The larger an images file size the longer it takes
Transparency
Animation
Moving images GIF Flash
Images
Images are placed in Web documents using the img tag This tag is empty, and therefore has no closing tag The tag is < img >, < img > by itself is pointless-- it will do nothing At the very least, you need to let the browser know where to find the image that it's supposed to place in the document. In order to make the img tag work, you need to use an src attribute src stands for "source," as in, "the source of this graphic. The value of src is the URL of the graphic you want to have displayed on your Web page. Thus, a typical image tag will take the form: <
images.ht m
Within img tag, after src attribute, type width=x height=y (in pixels)
<img src="Sunset.jpg" alt="sunset" width="150" height="100"/>
Links
Starts with <a> and ends with </a> Cannot use the <a> tag by itself, because it doesn't do anything.
href
Stands for hypertext reference, A way of saying, "The location of the file I want to load." Most anchors are in the form <a href="URL">, where URL is the location of the resource to which you want the link to point.
<a href="C:\Documents and Settings\hanamunira\ My Documents\2007-S1\IP-ICT 1083-DSN4\mystuff \week two\Sunset.jpg"> <img src="ss.jpg" alt=sunset /> <br />
Image float along side of your web page, with text and other elements wrapping around the other
<img src="Blue hills.jpg" align="right" alt="bluehills" width="150" height="100"/>
as
<!-- making image float --> <p> <img src="Blue hills.jpg" align="right" alt="bluehills" width="150" height="100"/> <img src="Blue hills.jpg" align="left" alt="bluehills" width="150" height="100"/>
</p>
<center> <img src="Blue hills.jpg" alt="bluehills" width="150" height="100"/> </center>
Use deprecated vspace and hspace attributes to add a buffer around the image
<body> <h1> MAIN TITLE </h1> <img src=image1.jpg align=right width=200 height=350 alt=an IMAGE vspace=15/> <br clear=right /> <p>This IMAGE1 are align to the RIGHT of this text</p> </body>
Aligning Images
<img src=tall.jpg alt=tall image />default <img src=square.jpg align=texttop alt=square /> texttop <p><img src=tall.jpg alt=tall image />default <img src=square.jpg align=top alt=square /> top</p> <p><img src=tall.jpg alt=tall image />default <img src=square.jpg align=middle alt=square /> middle</p> <p><img src=tall.jpg alt=tall image />default <img src=square.jpg align=absmiddle alt=square /> absmiddle</p> <p><img src=tall.jpg align=texttop alt=tall image />texttop <img src=square.jpg align=bottom alt=square /> bottom</p> <p><img src=tall.jpg align=texttop alt=tall image />texttop <img src=square.jpg align=absbottom alt=square /> absbottom</p>
1. 2. 3. 4.
5.
6.
Texttop aligns the square with the highest text in the line Top align the square with the highest element in the line Middle aligns the middle of the square with the middle of the text Absmiddle aligns the middle of the square with the middle of the largest item in the line Bottom aligns the bottom of the square with the baseline of the text Absbottom aligns the bottom of the square with the bottom of the largest item in the line
One graphic element that is completely supported by the majority of the browsers is the horizontal rule
Break 5 !
links