Featured

KSnapshot

KSnapshot is a Linux utility for capturing screen shots. You can capture screen-shot of the entire desktop, a specific window, or a region.
+ Full Article

More Featured Articles

Most Read

Most Read

Setting up Team Discussion Board

SharePoint 2007 has a Team Discussion Board that is used to initiate discussion and get replies on topics of interest. This article outlines the steps required to setup a discussion board, managing...
+ Full Article

More Popular Articles

Recent Articles

Recent Articles

Repeating Excel Header Rows

If your worksheet has several pages, it will be useful to have the header row repeat in all the pages. This will improve productivity as the user need not flip to the first page to view the header...
+ Full Article

More Recent Articles
Displaying Images on Web Pages PDF Print
User Rating: / 1
PoorBest 
Web - Web Design
The 'img' element defines displaying and positioning an image on a web page. In its basic form it takes in a 'src' argument that defines the URL of the image to display.

Example

In this example a simple syntax to display image on a web page is given:

Syntax Image
<img src="/reference/images/world.png" /> world image

The 'alt' attribute

The 'alt' attribute is used in conjunction with 'img' tag to provide a description of the image displayed. This is an optional attribute. However, it is suggested to use them for reasons that include

 

  • As a rule of thumb smaller the image faster is the page display. If the size of an image is large, an 'alt' attribute ensures that the 'alt' description gets displayed quickly giving an indication to the reader that an image is to be followed.
  • If the Browser cannot or is not configured to display images an 'alt' attribute will act as a placeholder for the image.
Example

Modifying the above example to include an 'alt' attribute:

 

Syntax Image
<img src="/reference/images/world.png" alt="World Map" /> World Map

Hyperlink an Image

You can hyperlink an image by using 'a href' tag as shown below:

 

Syntax Image
<a href="http://referpages.com" /> < img src="/reference/images/world.png" /> world map

Aligning Images

Use the 'align' attribute to align images to the right, left, middle, top, and bottom.

 

Syntax Image
This image is < img src="/reference/images/world.png" align="right" /> to the right This image is world imageto the right.

 

Syntax Image
This image is < img src="/reference/images/world.png" align="middle" /> to the middle This image is world image to the middle.

In HTML 4.0 the 'align' attribute has been deprecated in favor of stylesheets.

 

Trackback(0)
Comments (0)add
Write comment

security image
Write the displayed characters


busy
Last Updated on Saturday, 17 November 2007 21:47
 

now browsing!

We have 27 guests online

Sharepoint

Using Excel (Excel 2003) Data Source to Retrieve Data from Sharepoint List

Using Excel 2003, one can create a data source to retrieve data from a sharepoint list. This method has also the added benefit of displaying columns that are not generally displayed in a traditional...
+ Full Article

More on Sharepoint

Windows

FTP

File Transfer Protocol (FTP) client is used to transfer files between your PC and a Server or vice versa. If your FTP Server has been setup to allow anonymous login, users can login without any...
+ Full Article

More on Windows
 

Sedo - Buy and Sell Domain Names and Websites project info: referpages.com Statistics for project referpages.com etracker® web controlling instead of log file analysis