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 34 guests online

Training

UPK Training

UPK Developer Training Course Description  Overview Understanding Developer menu and toolbar itemsSetting Developer PreferencesManaging FoldersManaging DocumentsCreating Views
+ Full Article

More on Training

Featured

Using Thickbox for rich User Interface

Thickbox is an User Interface (UI) widget written in JavaScript and built using JQuery library. Thickbox can be used on any page to display images, inline content, iframe content etc. It provides a...
+ Full Article

More Featured Articles

Sharepoint

Printing Sharepoint Webparts

One of the limitations of Sharepoint is the absence of print feature for the web parts and one has to rely on the browser's print functionality. How to print a web part in an elegant way?
+ Full Article

More on Sharepoint

Windows

Windows Address Bar

Most of the programs on Windows can be opened quickly using the Address bar. You can also navigate directly to a web page by entering the URL in the Address bar. This function is similar to using the...
+ 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