Name
tags — NN 4 IE n/a DOM n/a
Synopsis
The tags
object is
used by JavaScript syntax for style sheets. As a property of the
document
object, this tags
object is used in building references to particular HTML elements to
get or set their style-related properties. The direct properties of
the tags
object are all HTML element types. For
example:
[document.]tags.P [document.]tags.H1
There is no need to repeat a list of all HTML elements as properties
for this object. These references are usable inside
STYLE
elements whose TYPE is set to
text/javascript
. That’s where you assign
values to style sheet properties with JavaScript syntax, as in the
following examples:
tags.P.color = "green" tags.H1.fontSize = "14pt"
The properties in the following list are not properties of the
tags
object per se, but rather of the style sheet
associated with an element, class, or ID singled out by a JavaScript
syntax assignment statement. The properties are listed here for
convenience. Properties dedicated to element positioning are listed
separately from regular style properties. A cross reference between
these JavaScript properties and their CSS attribute counterparts can
be found in Chapter 3 (and Chapter 4 for positioning properties). For information
about these property values, consult the CSS reference chapter, where
you can find details of all style sheet properties listed by CSS
syntax.
Style Properties
|
|
|
|
|
|
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.