className property
Gets the names of the classes that are assigned to this object.
![]() ![]() |
Syntax
| JavaScript |
|---|
p = object.className |
Property values
Type: Object
A class name or set of class names. Multiple class names are separated by white space characters.
Standards information
- Scalable Vector Graphics: Basic Data Types and Interfaces, Section 4.5.22
Remarks
The className property gets the names of the classes that are assigned to this object. The object belongs to these classes. Several object instances can share a class name.
The className property has several roles:
- As a style sheet selector (when you want to assign style information to a set of elements).
- For general purpose browser processing.
See also
- SVGAElement
- SVGCircleElement
- SVGClipPathElement
- SVGDefsElement
- SVGDescElement
- SVGEllipseElement
- SVGFilterElement
- SVGForeignObjectElement
- SVGGElement
- SVGGradientElement
- SVGImageElement
- SVGLinearGradientElement
- SVGLineElement
- SVGMarkerElement
- SVGMaskElement
- SVGPathElement
- SVGPatternElement
- SVGPolygonElement
- SVGPolylineElement
- SVGRadialGradientElement
- SVGRectElement
- SVGStopElement
- SVGSVGElement
- SVGSwitchElement
- SVGSymbolElement
- SVGTextContentElement
- SVGTextElement
- SVGTextPathElement
- SVGTextPositioningElement
- SVGTitleElement
- SVGTSpanElement
- SVGUseElement
Show:

