Home
Username:
Password:
HTML 4/5 with CSS Tutorials

Color & Images / IMG Tag Attributes




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

Let me now cover the various attributes of the IMG or Image tag. We've already reviewed width, height and the alt attribute - let me say a few more words about width and height. These stand for just that - the width and height of the images. The height can just be about anything as well as the width, but generally these will be less than the height and width of the browser. Here in this table of IMG tag attributes the 4 here indicates if the attribute is defined in HTML 4.01, 5 indicates if the attribute is defined in HTML 5. Here we have the alt attribute - value is text, this defines a short description of the image defined in both HTML 4 and 5. Src - value is URL, the URL of the image to display. The align attribute was deprecated in HTML 4.01 and has been completely unsupported in HTML 5. Notice there's no 5 there. This specifies how to align the image according to surrounding text. I recommend using CSS instead. The border was also deprecated in HTML 4 and is unsupported in HTML 5. This defines a border around an image. Again, you'll want to use CSS instead. There is our height attribute, then is the ismap. This is a value URL, defines the image as a server-side image map. The longdesc attribute is also a URL value. This is a URL to a document that contains a longer description of the image. This is also not supported in HTML 5. And then the last two are the usemap. This is a URL value. It defines the image as a client-side image map which I reviewed earlier. Look at the map tag and the area tags to figure out how this works. Here in our previous example, here is the map tag with the name attribute. Here's the area tag defining the area of the polygon that defines the image map here. And then the last attribute is the width attribute; the value is in pixels and this sets the width of an image. So, to summarize the differences between the attributes for HTML 4.01 and HTML 5 is the align, border, hspace and vspace attributes of the image element were deprecated in HTML 4.01 and are completely unsupported in HTML 5. That'll then conclude this section of the tutorial on Color and Images. In this section you've learned all about color on the Web, how to create attractive color schemes, creating and naming graphics. You've learned about image resolution and image file formats that you'll want to use for web pages. You've also learned some techniques for getting your images to load faster, how to use background images and color your HTML page backgrounds. You've learned about image maps, the image tags and we've reviewed some of the more common image tag attributes. That takes us to the next section of the tutorial on Links. We'll learn about the Anchor element, Absolute versus Relative Links, File Structure and Linking Tips, the anchor tag attributes and much, much more.

Tutorial Information

Course: HTML 4/5 with CSS
Author: James Gonzalez
SKU: 34077
ISBN: 1-935320-93-9
Release Date: 2009-12-31
Duration: 10.5 hrs / 142 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available