| Displaying Images on Web Pages |
|
|
| 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:
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
Modifying the above example to include an 'alt' attribute:
Hyperlink an Image You can hyperlink an image by using 'a href' tag as shown below:
Aligning Images Use the 'align' attribute to align images to the right, left, middle, top, and bottom.
In HTML 4.0 the 'align' attribute has been deprecated in favor of stylesheets.
Set as favorite
Bookmark
Email This
Hits: 547 Trackback(0)
Comments
(0)
|
||||||||||||||||||||
| Last Updated on Saturday, 17 November 2007 21:47 |



