Core attributes
| Attribute | Value | Meaning |
|---|---|---|
id | an XML name | Unique in the document. Every reference (href, url(#id), begin="id.click", aria-labelledby) names an element by it. A repeated id is an error: a reference takes the first element. The explorer lists all ids, how often each is referenced, and what it is. |
class | space-separated names | For CSS class selectors. |
style | CSS declarations | Inline style: style="fill:red;stroke:none". It beats a presentation attribute and a style sheet rule (unless !important is used there). The tree shows each declaration as a child node. |
lang, xml:lang | BCP 47 tag | The language of the element’s text; used for font choice, hyphenation and :lang(). SVG 1.1 has xml:lang only; SVG 2 adds lang. |
xml:space | default or preserve | Whether white space in text is collapsed. SVG 2 deprecates it for CSS white-space. |
xml:base | address | The base for relative addresses. |
tabindex, autofocus | integer, boolean | Keyboard focus. In documents only. |
role, aria-* | ARIA values | Accessibility roles and states, for example role="img" with aria-label or aria-labelledby. |
data-* | text | Custom data for scripts and style sheets; no effect on drawing. |
nonce, crossorigin | text | Content security policy nonce for scripts and styles; fetch mode for external resources. |
externalResourcesRequired | boolean | SVG 1.1: whether the element waits for the external resources it needs. Removed from SVG 2. |
xmlns, xmlns:prefix | namespace address | Namespace declarations. They are not attributes of the element in the DOM sense, and the explorer lists them under namespaces. |
Conditional processing
| Attribute | Meaning |
|---|---|
systemLanguage | A comma-separated list of language tags; true when one matches the user’s language (a tag matches its sub-tags, so en matches en-GB). An empty value is false. |
requiredExtensions | Extension addresses the reader has to support; true when all are. |
requiredFeatures | SVG 1.1 feature strings (such as http://www.w3.org/TR/SVG11/feature#Shape). SVG 2 removed the attribute; readers treat it as true. |
They work on graphics and container elements, switch, animation elements and text-related elements. On any other element the explorer lists them as unexpected.
Event attributes
Attributes whose name begins with on hold script that runs when the
event happens. They never run in an SVG shown as an image, and the explorer lists
each one on the Code tab.
| Group | Attributes |
|---|---|
Document (on svg) | onload, onunload, onabort, onerror, onresize, onscroll, onzoom |
| Animation | onbegin, onend, onrepeat |
| Graphics (SVG 1.1) | onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onload |
| SVG 2 and HTML-style | the global event handlers of HTML: onfocus, onblur, onkeydown, onpointerdown, ontouchstart, onwheel and the others |
Not described
This page is partial.
- Reference: the event list is not complete (only the groups are named), ARIA roles and states are not described, and everything was written without the specification texts open.
- Viewer: checks
iduniqueness, lists scripts and event attributes, and notesaria-*anddata-*. It does not evaluatesystemLanguage, check ARIA values, or run any handler.