O'Reilly logo

Web Design in a Nutshell, 2nd Edition by Jennifer Niederst Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. List of Attributes

Most HTML tags rely on attributes to modify their behavior and make them more useful. With so many available tags and attributes, it’s easy to forget which tag goes with which attributes. For instance, you may know that you want to set the padding value for a table, but you can’t remember which tag takes the cellpadding attribute (the answer to this one is <table>).

The following table provides an alphabetical list of all attributes as listed in the HTML 4.01 specification. The “Related Elements” column provides a list of tags that can use that attribute. The table also lists:

  • Accepted values for each tag

  • Whether the attribute is required

  • A description of the attribute’s use

  • Whether the attribute has been deprecated (indicated by a D in the “Depr.” column)

Note that some attributes appear more than once in the list. This is due to the fact that they may be used differently or may take different values depending on the tag in which they are used.

Name

Related elements

Values

Depr.

Comment

abbr

TD, TH

text

Abbreviated name for table cell

accept-charset

FORM

list

List of supported character sets

accept

INPUT, FORM

MIME types

List of MIME types for file upload

accesskey

A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA

single character

Assigns a shortcut key that brings focus to (activates) the element

action (required)

FORM

URL

Location of the CGI form processor on the server

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required