Attr — Inherits Node
The Attr
interface
is the Node
interface for
attributes of an element. The DOM does not consider an Attr
part of the tree, and therefore the
attributes parentNode
, previousSibling
, and nextSibling
are all None
for Attr
objects. Attributes should be
considered properties of elements. Attr
nodes cannot be immediate children of
a DocumentFragment
, but can be
contained within an element of a document fragment.
The value for a node is its assigned value within the actual
markup. Failing that, if a default value is specified in the DTD, it
is used. Child nodes of an Attr
may be Text
nodes or of the type
EntityReference
.
name
The name of the attribute.
ownerElement
This property represents the Element
node to which the attribute
is attached.
specified
This Boolean property lets you know if the value was
explicitly stated in the markup (true
), or if it is the default value
as assigned by the DTD. The value also returns true if the
value has been manipulated or is explicitly assigned, but
still holds the default value. If the ownerElement
attribute is None
(if this node is not currently
associated with an element), then specified
is also true
.
value
This is the actual value of the key/value pair that
makes up the Attr
within
any given Element
.
3.144.244.250