How to Do Everything with HTML XHTML [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

How to Do Everything with HTML XHTML [Electronic resources] - نسخه متنی

James H. Pence

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید




Quick Reference: Adding Images


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="image.gif" />


Make an image a link


<a href="webpage"><img 

src="image.gif" />



Make a combined image link and text link


<a href="webpage"><img 

src="image.gif" />Place

Text Here</a>



Provide alternate text


<img src="image.gif"   />


Specify an image’s height and width


<img src="image.gif" height="#" 

width="#" /> (# in pixels)



Align an image to the left or right, with text wrapping (Deprecated)


<img src="image.gif" align="left" />

or "right"



Position an image relative to text or another image (Deprecated)


<img src="image.gif" align="top">

or "middle," or "bottom"



Add white space on the sides of an image (Deprecated)


<img src="image.gif" hspace="#">

(# in pixels)



Add white space on an image’s top and bottom


<img src="image.gif" vspace="#" />

(# in pixels)



Use CSS to add a background image (tiled)


<style> body {background-image: 

(url)image.gif} </style>



Use CSS to add a background watermark


<style> body {background-image: 

(url)image.gif; background-attachment:

fixed}</style>



Use CSS to add a background image down the left side of your page


<style> body {background-image: 

(url)image.gif; background-repeat:

repeat-y; background-position:

left}</style>



Use CSS to add a red inset border around your images


<style> img {border-style: inset;

border-width: thick; border-color:

red} </style>



/ 126