Advertisement
Home Open Editor ❯

HTML <svg> width Attribute

Example

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

Try this code ❯

Meaning

The width attribute defines the horizontal length of an element in the user coordinate system.


Standard Syntax

<svg width="length|percentage">


Advertisement

Attribute Values

Value Description
length Specifies the width in pixel.
percentage Specifies the width in percentage.
Home Open Editor ❯
Advertisement