The height
attribute defines the vertical length of an element in the user coordinate system.
Twenty five elements are using this attribute: <feBlend>
, <feColorMatrix>
, <feComponentTransfer>
, <feComposite>
, <feConvolveMatrix>
, <feDiffuseLighting>
, <feDisplacementMap>
, <feDropShadow>
, <feFlood>
, <feGaussianBlur>
, <feImage>
, <feMerge>
, <feMorphology>
, <feOffset>
, <feSpecularLighting>
, <feTile>
, <feTurbulence>
, <filter>
, <foreignObject>
, <image>
, <mask>
, <pattern>
, <rect>
, <svg>
, and <use>
<svg viewBox="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- With a height of 0 or less, nothing will be rendered --> <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>
For <feBlend>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feColorMatrix>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feComponentTransfer>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feComposite>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feConvolveMatrix>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feDiffuseLighting>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feDisplacementMap>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feDropShadow>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feFlood>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feGaussianBlur>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feImage>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feMerge>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feMorphology>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feOffset>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feSpecularLighting>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feTile>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <feTurbulence>
, height
defines the vertical length for the rendering area of the primitive.
Value | <length> | <percentage> |
---|---|
Default value | 100% |
Animatable | Yes |
For <filter>
, height
defines the vertical length for the rendering area of the filter.
Value | <length> | <percentage> |
---|---|
Default value | 120% |
Animatable | Yes |
For <foreignObject>
, height
defines the vertical length for the rendering area for the referenced document.
Value |
auto | <length> | <percentage>
|
---|---|
Default value |
auto (treated as 0 ) |
Animatable | Yes |
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for <foreignObject>
.
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.
For <mask>
, height
defines the vertical length of its area of effect. The exact effect of this attribute is influenced by the maskUnits
attribute.
Value | <length> | <percentage> |
---|---|
Default value | 120% |
Animatable | Yes |
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 |
For <rect>
, height
defines the vertical length for the rectangle.
Value |
auto | <length> | <percentage>
|
---|---|
Default value |
auto (treated as 0 ) |
Animatable | Yes |
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for rectangles.
For <foreignObject>
, height
defines the vertical length for the rendering area of the SVG viewport.
Note: In an HTML document if both the viewBox
and height
attributes are omitted, the svg element will be rendered with a height of 150px
Value |
auto | <length> | <percentage>
|
---|---|
Default value |
auto (treated as 100% ) |
Animatable | Yes |
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for <svg>
.
For <rect>
, height
defines the vertical length for the referenced element.
Value |
auto | <length> | <percentage>
|
---|---|
Default value |
auto (treated as 0 ) |
Animatable | Yes |
Note: Starting with SVG2, height
is a Geometry Property meaning this attribute can also be used as a CSS property for used elements.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/height