Hexidecimal Colors
Graphics Formats
Optimization
Dithering
Inserting Images
<img> Attributes
alt text
Height and width
Scaling
Aligning text to an images
Links
URLs
index.html
page 41
hexidecimal colors
• colors displayed in RGB -- 0 to 255
• decimal is based on 10; hex based in 16 (0 through F)
• must have # preceding
• eg #FFFF00 = yellow
• eg #FF0000 = red
Graphics formats
Print= TIFF, EPS, PICT
Web = JPEG, GIF, PNG, SCA*
(compression algorithms built in)
Vector = Illustrator - not a language understood by browser
Dithering
• selecting GIF dither (eg 128) from settings: simulates a larger
number of colors /reduce banding
• technique of mingling two colors together for optical illustion of
another
• if color is outside range, browser tries to mix colors that are
available.
• two types of dithering: application, browser
page 46
Inserting images
• create your own images in Photoshop or Fireworks
-optimize as gif or jpeg
• download an image from the web - control+click > save to disk
• www.google.ca has an image search tab
• images downloaded from the web cannot be altered in
Photoshop or Fireworks without serious deterioration in quality.
Even to resize, it must be recompressed when saved
<img> attributes
ATTRIBUTE DESCRIPTION
src specifies the filename of the image file
alt alternate text to display in place of image
longdesc identifies URL of web page with long description of image
width width
height height
usemap identifies image to be used as a client-side image map
ismap identifies image to be used as a server-side image map
page 47
alt Text
• attribute of <img>
• required element for well-formed XHTML
• displays text in place of the graphic
- if images turned off
- Lynx browser (text only)
- image file missing
• some search engines spider alt tags
Scaling images
• not recommended
• reduces appearance
• still has to load full file size
• always resize in Photoshop or Fireworks
align Attribute
(old HTML - does not validate Strict)
• places the alignment of text to the image
• must all be in the same paragraph
• top, middle, bottom; right, left
• default is bottom, left
• alignment should be left for CSS, not XHTML compliant.
• can be used in Transitional
Links
• created with the <a> element
• means "anchor"
• inline element
• nested inside block-level element such as <p></p>
• href = hypertext reference
• link colors changed as attribute of <body>
<body link="#3399CC" vlink="#6699FF">
(this is HTML, won't validate, set in CSS)
Image as a link
<p><a href="banjo.html"><img src="banjo.jpg" width="252"
height="239" alt="Banjo the dog" /></a>
...
<h1>Central Valley Farmers’ Market</h1>
<h2>Contact Information</h2>
<p>If you have any questions or concerns about the Central
Valley Farmers’ Market, please call (908) 626-3764.</p>
<p>P.O. Box 135<br />
Central Valley, CA 94359</p>
<p><a href="centralvalley.html">Home</a></p>
...
page 50
mailto:
<p><a href="mailto:president@apple.com">Send a message to
the president</a></p>
mailto elements
• cc=emailaddress for a cc
• bcc=emailaddress for a Bcc
• subject=subject text for a Subject
• multiple elements are separated by an & (ampersand)
<a href="mailto:guide@apple.com?bcc=gethelp@apple.com
&subject=testing">
<p><a href="http://validator.w3.org/check/referer">
<img src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
this should be placed on the bottom of each xhtml page if it is infact valid.