• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Advanced Graphics > Layout Considerations when Using the <IMG> Tag

Layout Considerations when Using the <IMG> Tag

After you have an image stored and ready to be posted on the Web, you need to use the HTML <IMG> tag to place the image on a page. <IMG> is a standalone tag that takes the attributes shown in Table 5.1. According to the HTML 4.0 standard, only SRC is mandatory. You will quickly find, however, that you want to use many of the attributes.

Table 5.1. Attributes of the <IMG> Tag
AttributePurpose
ALTSupplies a text-based alternative for the image
ALIGNControls alignment of text following the image
BORDERSpecifies the size of the border to place around the image
HEIGHTSpecifies the height of the image in pixels
HSPACEControls the amount of whitespace to the left and right of the image
ISMAPDenotes an image to be used as part of a server-side imagemap
LONGDESCProvides the URL of a link to a longer description of the image's content
SRCSpecifies the URL of the file where the image is stored
USEMAPSpecifies a client-side imagemap to use with the image
VSPACEControls the amount of whitespace above and below the image
WIDTHSpecifies the width of the image in pixels



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint