Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

You can find some basic examples of SVG syntax and usage in the W3C SVG test suite.

Note: As of Gecko 2.0, Gecko supports SVG animation using SMIL. See SVG animation with SMIL for a brief overview. Full documentation for SVG is forthcoming. Someday.

There is also a description of the Mozilla support of the changes in SVG 2.

Element implementation status

A quick overview of the SVG 1.1 elements and the current status of the native support.

Element Notes
Structure Module
svg
  • Implemented.
  • currentScale and currentTranslate DOM attributes are implemented, but there is no pan and zoom user interface.
  • SVGSVGElement
    • Unimplemented attributes: contentScriptType, contentStyleType, viewport, currentView
    • Unimplemented bindings: getIntersectionList, getEnclosureList, checkIntersection, checkEnclosure
g
  • Implemented.
defs
  • Implemented.
desc
  • Implemented.
  • Only stored in the DOM, no user interface.
title
  • Implemented.
  • The title is displayed as a tooltip when the mouse hovers over the SVG object.
metadata
  • Implemented.
  • Only stored in the DOM, no user interface.
symbol
  • Implemented.
use
  • Implemented.
  • Doesn't completely follow <svg:use> cascading rules (bug 265894).
  • Doesn't deliver events to a SVGElementInstance tree (bug 265895).
Conditional Processing Module
switch
  • Implemented.
Image Module
image
  • Implemented.
Style Module
style
  • Implemented.
Shape Module
path
  • Implemented.
  • SVGPathElement Interface
    • Unimplemented attributes: normalizedPathSegList, animatedNormalizedPathSegList
rect
  • Implemented.
circle
  • Implemented.
line
  • Implemented.
ellipse
  • Implemented.
polyline
  • Implemented.
polygon
  • Implemented.
Text Module
text
  • Implemented.
  • Various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical)
  • Recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration
  • SVGTextElement
    • Recently imlemented bindings: selectSubString
    • Recently implemented attributes: textLength, lengthAdjust
tspan
  • Implemented.
  • Various presentation attributes don't work (alignment-baseline, baseline-shift, dominant-baseline, kerning, letter-spacing, word-spacing, writing-mode, glyph-orientation-horizontal, glyph-orientation-vertical)
  • Recently implemented presentation attributes: direction, unicode-bidi, font-variant, text-decoration
  • SVGTSpanElement
    • Recently implemented bindings: selectSubString
    • Recently implemented attributes: textLength, lengthAdjust
tref
  • This feature, present in early draft of the spec, has been removed from it and is therefor not implemented (bug 273171).
textPath
  • Implemented.
  • Recently implemented bindings: selectSubString
altGlyph
altGlyphDef
  • Not implemented.
altGlyphItem
  • Not implemented.
glyphRef
  • Not implemented.
Marker Module
marker
  • Implemented.
Color Profile Module
color-profile
Gradient Module
linearGradient
  • Implemented.
radialGradient
  • Implemented.
stop
  • Implemented.
Pattern Module
pattern
  • Implemented.
Clip Module
clipPath
  • Implemented.
Mask Module
mask
  • Implemented.
Filter Module
filter
  • Implemented.
  • Of the pseudo-inputs, SourceGraphic, SourceAlpha, FillPaint and StrokePaint are implemented.
  • Use of an unimplemented pseudo-input or filter element will cause the filter to be ignored and the referring graphic to be drawn without any filter.
feBlend
  • Implemented.
feColorMatrix
  • Implemented.
feComponentTransfer
  • Implemented.
feComposite
  • Implemented.
feConvolveMatrix
  • Implemented.
feDiffuseLighting
  • Implemented.
feDisplacementMap
  • Implemented.
feFlood
  • Implemented.
feGaussianBlur
  • Implemented.
feImage
  • Implemented.
  • Document fragments (bug 455986) aren't supported in <svg:feImage>.
feMerge
  • Implemented.
feMergeNode
  • Implemented.
feMorphology
  • Implemented.
feOffset
  • Implemented.
feSpecularLighting
  • Implemented.
feTile
  • Implemented.
feTurbulence
  • Implemented.
feDistantLight
  • Implemented.
fePointLight
  • Implemented.
feSpotLight
  • Implemented.
feFuncR
  • Implemented.
feFuncG
  • Implemented.
feFuncB
  • Implemented.
feFuncA
  • Implemented.
Cursor Module
cursor
Hyperlinking Module
a
  • Only xlink:href, xlink:show, xlink:target and xlink:title attributes implemented.
View Module
view
Scripting Module
script
  • Implemented.
Animation Module
animate
  • Implemented
set
  • Implemented
animateMotion
  • Implemented
animateTransform
  • Implemented
animateColor
mpath
  • Implemented
Font Module
font
font-face
  • Not implemented.
glyph
  • Not implemented.
missing-glyph
  • Not implemented.
hkern
  • Not implemented.
vkern
  • Not implemented.
font-face-src
  • Not implemented.
font-face-uri
  • Not implemented.
font-face-format
  • Not implemented.
font-face-name
  • Not implemented.
definition-src
  • Not implemented.
Extensibility Module
foreignObject
  • Implemented.