defs: An element used to contain definitions

Description Available Attributes (Named Parameters) Available Content Elements (Unnamed Parameters)

Description

SVG allows graphical objects to be defined for later reuse. It is recommended that, wherever possible, referenced elements be defined inside of a defs element. Defining these elements inside of a defs element promotes understandability of the SVG content and thus promotes accessibility. Graphical elements defined in a defs will not be directly rendered. You can use a <use> element to render those elements wherever you want on the viewport.

Available Attributes (Named Parameters)

Animation Event Attributes

onload

Conditional Processing Attributes

requiredExtensions, requiredFeatures, systemLanguage

Core Attributes

id, xml.base, xml.lang, xml.space

Graphical Event Attributes

onactivate, onclick, onfocusin, onfocusout, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup

Presentation Attributes

clip.path, color.interpolation, color.rendering, cursor, enable.background, filter, mask, opacity

Unclassified

class, externalResourcesRequired, style, transform

Available Content Elements (Unnamed Parameters)

Animation Elements

animate, animateColor, animateMotion, animateTransform, set

Descriptive Elements

desc, metadata, title

Gradient Elements

linearGradient, radialGradient

Graphics Referencing Elements

image, use

Non-structural Container Elements

a, marker, mask, pattern, switch

Shape Elements

circle, ellipse, line, path, polygon, polyline, rect

Structural Container Elements

defs, g, svg, symbol

Text Content Elements

text

Uncategorized Elements

altGlyphDef, clipPath, color.profile, cursor, filter, font, font.face, foreignObject, script, style, view


mslegrand/svgR documentation built on Jan. 21, 2020, 2:59 p.m.