|
In this chapter, you have learned the basics of adding images to your Web pages. Although there is more to learn, this will give you enough to practice with as you become comfortable with HTML. The following table lists some of the markup required to embed and position images on your Web page:
To Do This | Use This |
---|---|
Embed an image | <img src="/books/4/238/1/html/2/image.gif" /> |
Make an image a link | <a href="webpage.htm"><img |
Make a combined image link and text link |
<a href="webpage.htm"><img |
Provide alternate text | <img src="/books/4/238/1/html/2/image.gif" alt="alternate |
Specify an image’s height and width | <img src="/books/4/238/1/html/2/image.gif" height="#" |
Align an image to the left or right, with text wrapping (Deprecated) | <img src="/books/4/238/1/html/2/image.gif" align="left" /> |
Position an image relative to text or another image (Deprecated) | <img src="/books/4/238/1/html/2/image.gif" align="top"> |
Add white space on the sides of an image (Deprecated) | <img src="/books/4/238/1/html/2/image.gif" hspace="#"> |
Add white space on an image’s top and bottom | <img src="/books/4/238/1/html/2/image.gif" vspace="#" /> |
Use CSS to add a background image (tiled) | <style> body {background-image: |
Use CSS to add a background watermark |
<style> body {background-image: |
Use CSS to add a background image down the left side of your page |
<style> body {background-image: |
Use CSS to add a red inset border around your images |
<style> img {border-style: inset; |
|