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

Chapter 12. Editing and Using Tag Librar... > How to Edit, Add, and Remove Attribu...

How to Edit, Add, and Remove Attributes

Attributes are modifiers for tags—they’re the adverbs of the tag world. Some tags require one or more attributes—the most obvious example of this is the src attribute for an img tag (otherwise, how would the browser find the image?). Most attributes are optional, however, like the alt attribute that supplies a text equivalent for an image. Other common attributes include width, border, and name, all of which you’ve seen applied to various tags such as table, img, div, and the frameset tags.

The Tag Library Editor allows you to add and remove tag attributes for both pre-built and custom tags. It also lets you specify the possible values for those attributes—this can be particularly handy for jogging the memory of those who are coding using your markup language or custom tag. For instance, one attribute of <evil> might be degree. You might define the possible values of degree as numbers, say, from 1 to 7, so that your tag would look like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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