This is a discussion on HTML Images within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; HTML Image Basics To insert an image into a Web page, use an <img> tag and set its src attribute ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| WMT Addict | HTML Image Basics To insert an image into a Web page, use an <img> tag and set its src attribute equal to the URL of the image. Most likely, the image element will use a relative URL to an image found locally. To insert a GIF image called image.gif residing in the same directory as the current document, use <img src="image.gif"> Button Images One of the most important aspects of images, is how they can be combined with the a element to create buttons. Example: <a href="http://www.demosite.com"><img src="image.gif" alt="Demo Site" ></a> Using the alt Attribute The alt attribute provides alternative text for user agents that do not display images, or for graphical browsers where the user has turned off image rendering. <img src="image.gif" alt="Demo Image"> Advanced Image Considerations Although most of the basic uses of images have been discussed, there are some issues that should be mentioned for later discussion. First, because an image can be referenced by a style sheet or by a scripting environment, it might be very important to provide a name or identifier for it. The class, id, and name attributes can be used to provide names for images so they can be referenced and manipulated by scripting or style information that usually is found in the head of the document. |
| | |
| Tags |
| html, images |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Protect images | ClockworkOrange | HTML, DHTML and CSS | 1 | 21-08-2006 18:18 |
| Fading Images | asgsoft | Website Design Articles | 23 | 08-08-2005 19:15 |
| Goodbye images! | Lewis | Website Design Forum | 10 | 28-07-2005 19:19 |
| Html Tutorial Part Two *Text and Images | Morphmaster | Programming Articles | 2 | 14-05-2005 15:40 |
| Expanding Images | Aaron | Programming Articles | 0 | 23-04-2005 21:53 |