A Complete Guide to Web Design

(やまだぃちぅ) #1

483


HTML

Attributes

Web Design in a Nutshell, eMatter Edition

Appendix BHTML Attributes

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 thecellpad-
ding attribute (the answer to this one is

).


This appendix lists all of the available attributes as listed in the HTML 4.0 Specifi-
cation, in alphabetical order. The “Related Elements” entry lists the tags that can
use that attribute. Also included are:


Accepted values for each tag
In the “Values” list, courier text indicates a literal value that must be typed in
as shown; courier italic indicates a replaceable value description, for which
you would provide your own value.


Whether the attribute is required
At the right of each entry is an indication of whether the attribute isRequired
orOptional.


Whether the tag is deprecated
The word “Deprecated” in parentheses indicates that the tag has been depre-
cated (discouraged from use in favor of newer tagging solutions) in the HTML
4.0 Specification. To read more about deprecated tags, see Appendix C,
Deprecated Tags.


A description of the attribute’s use
Descriptions of each attribute’s function or notes on its use are provided
below the attribute.


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.