Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <svg> height Attribute

The height attribute on an <svg> tag sets the height of the svg element.

The height is specified in pixels - without the ‘px‘ unit.

Example

#

An <svg> element with a <height attribute.

<svg width="100" height="100">
  <circle cx="50" cy="50" r="40" stroke="steelblue" 
          stroke-width="2" fill="lightblue" />
</svg>

Using height

The height attribute specifies the height of the svg element.

The height is specified in pixels -- without the 'px' unit.


Syntax

<svg height="pixels">

Values

#

Value Description
pixels Height of the svg element in pixels .

Browser support

Here is when height support started for each browser:

Chrome
4.0 Jan 2010
Firefox
3.0 Jun 2008
IE/Edge
9.0 Mar 2011
Opera
10.1 Jun 2010
Safari
3.2 Nov 2008

You may also like

 Back to <svg>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides