height
The height
attribute defines the vertical length of an element in the user coordinate system.
You can use this attribute with the following SVG elements:
Example
< svg viewBox = " 0 0 300 100" xmlns = " http://www.w3.org/2000/svg" >
< rect y = " 0" x = " 0" width = " 90" height = " 0" />
< rect y = " 0" x = " 100" width = " 90" height = " 60" />
< rect y = " 0" x = " 200" width = " 90" height = " 100%" />
</ svg>
feBlend
For <feBlend>
, height
defines the vertical length for the rendering area of the primitive.
feColorMatrix
For <feColorMatrix>
, height
defines the vertical length for the rendering area of the primitive.
feComponentTransfer
For <feComponentTransfer>
, height
defines the vertical length for the rendering area of the primitive.
feComposite
For <feComposite>
, height
defines the vertical length for the rendering area of the primitive.
feConvolveMatrix
For <feConvolveMatrix>
, height
defines the vertical length for the rendering area of the primitive.
feDiffuseLighting
For <feDiffuseLighting>
, height
defines the vertical length for the rendering area of the primitive.
feDisplacementMap
For <feDisplacementMap>
, height
defines the vertical length for the rendering area of the primitive.
feDropShadow
For <feDropShadow>
, height
defines the vertical length for the rendering area of the primitive.
feFlood
For <feFlood>
, height
defines the vertical length for the rendering area of the primitive.
feGaussianBlur
For <feGaussianBlur>
, height
defines the vertical length for the rendering area of the primitive.
feImage
For <feImage>
, height
defines the vertical length for the rendering area of the primitive.
feMerge
For <feMerge>
, height
defines the vertical length for the rendering area of the primitive.
feMorphology
For <feMorphology>
, height
defines the vertical length for the rendering area of the primitive.
feOffset
For <feOffset>
, height
defines the vertical length for the rendering area of the primitive.
feSpecularLighting
For <feSpecularLighting>
, height
defines the vertical length for the rendering area of the primitive.
feTile
For <feTile>
, height
defines the vertical length for the rendering area of the primitive.
feTurbulence
For <feTurbulence>
, height
defines the vertical length for the rendering area of the primitive.
filter
For <filter>
, height
defines the vertical length for the rendering area of the filter.
foreignObject
For <foreignObject>
, height
defines the vertical length for the rendering area for the referenced document.
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for <foreignObject>
.
image
For <image>
, height
defines the vertical length for the image.
Value
auto
| <length> | <percentage>
Default value
auto
(treated as the intrinsic height of the image)
Animatable
Yes
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for images.
mask
For <mask>
, height
defines the vertical length of its area of effect. The exact effect of this attribute is influenced by the maskUnits
attribute.
pattern
For <pattern>
, height
defines the vertical length of the tile pattern. The exact effect of this attribute is influenced by the patternUnits
and patternTransform
attributes.
Value
<length>
Default value
0
Animatable
Yes
rect
For <rect>
, height
defines the vertical length for the rectangle.
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for rectangles.
svg
For <svg>
, height
defines the vertical length for the rendering area of the SVG viewport.
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for <svg>
.
use
For <use>
, height
defines the vertical length for the referenced element.
Note: height
has no effect on use
elements, unless the element referenced has a viewBox - i.e. they only have an effect when use
refers to a svg
or symbol
element.
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for used elements.
Specifications