« SVG Attribute reference home

This attribute indicates a vertical length in the user coordinate system. The exact effect of this coordinate depends on each element. Most of the time, it represents the height of the rectangular region of the reference element (see each individual element's documentation for exceptions).

This attribute must be specified except for the <svg> element where the default value is 100% and the <filter> and <mask> elements where the default value is 120%.

Usage context

Categories None
Value <length>
Animatable Yes
Normative document SVG 1.1 (2nd Edition): foreignObject element
SVG 1.1 (2nd Edition): image element
SVG 1.1 (2nd Edition): pattern element
SVG 1.1 (2nd Edition): rect element
SVG 1.1 (2nd Edition): svg element
SVG 1.1 (2nd Edition): use element
SVG 1.1 (2nd Edition): Filter primitive
SVG 1.1 (2nd Edition): mask element

Example

<?xml version="1.0"?>
<svg width="120" height="120"
     viewBox="0 0 120 120"
     xmlns="http://www.w3.org/2000/svg">

  <rect x="10" y="10" width="100" height="100"/>
</svg>

Elements

The following elements can use the height attribute

Document Tags and Contributors

 Contributors to this page: essymo, Delapouite, Jeremie
 Last updated by: essymo,