scalable
vector
graphics
logo.png
logo.svg
<svg viewBox="0 0 100 100">
<image xlink:href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="100" width="100"/>
</svg>
<svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100">
<rect x="10" y="5" fill="white" stroke="black" width="90" height="90"/>
<circle fill="white" stroke="black" cx="170" cy="50" r="45"/>
<polygon fill="white" stroke="black" points="279,5 294,35 328,40 303,62
309,94 279,79 248,94 254,62 230,39 263,35"/>
<line fill="none" stroke="black" x1="410" y1="95" x2="440" y2="6"/>
<line fill="none" stroke="black" x1="360" y1="6" x2="360" y2="95"/>
</svg>
<svg>
<!-->
Create awesome shapes here!
<-->
</svg>
<svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100">
</svg>
viewBox="0 0 450 100"
x
y
width
height
0
<svg x="0px" y="0px" width="225px" height="50px" viewBox="0 0 450 100">
<!-- Shapes in here -->
</svg>
<svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100">
<!-- Shapes in here -->
</svg>
height/2
width/2
same viewBox
<svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100">
<rect x="10" y="6" fill="white" stroke="black" width="90" height="90"/>
<!-- other shapes in here -->
</svg>
<svg x="0px" y="0px" width="450px" height="100px" viewBox="0 0 450 100">
<rect x="10" y="5" fill="white" stroke="black" width="90" height="90"/>
<!-- other shapes in here -->
</svg>
y ++
same viewBox
viewBox="5 0 90 100"
viewBox="-20 -20 90 100"
<svg>
<rect x="30" y="10" fill="green" stroke="black" width="30" height="30"/>
</svg>
<svg>
<rect x="30" y="10" fill="green" stroke="black" width="30" height="30"/>
</svg>
x:
y:
width:
height:
fill:
stroke:
start x coord
start y coord
width
height
#fill color
#stroke color
<svg>
<rect x="30" y="10" rx="5" ry="5" fill="green" stroke="black" width="30" height="30"/>
</svg>
<svg>
<rect x="30" y="10" rx="5" ry="5" fill="green" stroke="black" width="30" height="30"/>
</svg>
x:
y:
rx:
ry:
width:
height:
fill:
stroke:
start x coord
start y coord
rounded corner
rounded corner
width
height
#fill color
#stroke color
<svg>
<circle fill="green" stroke="black" cx="50" cy="30" r="35"/>
</svg>
<svg>
<circle fill="green" stroke="black" cx="50" cy="30" r="35"/>
</svg>
cx:
cy:
r:
fill:
stroke:
midpoint x coord
midpoint y coord radius
#fill color
#stroke color
<svg>
<ellipse fill="green" stroke="black" cx="50" cy=30" rx="50" ry="25"/>
</svg>
<svg>
<ellipse fill="green" stroke="black" cx="50" cy=30" rx="50" ry="25"/>
</svg>
cx:
cy:
rx:
ry:
fill:
stroke:
midpoint x coord
midpoint y coord width
height
#fill color
#stroke color
<svg>
<line stroke-width="3" stroke="green" x1="50" y1="10" x2="50" y2="40"/>
</svg>
<svg>
<line stroke-width="3" stroke="green" x1="50" y1="10" x2="50" y2="40"/>
</svg>
x1:
x2:
y1:
y2
stroke-width:
stroke:
start x coord
end x coord
start x coord
end x coord
width of the line
#stroke color
<svg>
<polygon fill="green" stroke="black" points="60,10 75,20 40,70 50,70 45,20"/>
</svg>
<svg>
<polygon fill="green" stroke="black" points="60,10 75,20 40,70 50,70 45,20"/>
</svg>
points:
fill:
stroke:
coord of all points
#fill color
#stroke color
<svg>
<polyline fill="none" stroke="green" points="20,10 40,50 50,20 120,10"/>
</svg>
<svg>
<polyline fill="none" stroke="green" points="20,10 40,50 50,20 120,10"/>
</svg>
points:
fill:
stroke:
coord of all points
#fill color
#stroke color
<svg>
<path d="M 30 40 L 50 10" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M 30 40 L 50 10" stroke="green" stroke-width="3"/>
</svg>
M 30 40
MoveTo 30, 40
L 50 10
LineTo 50, 10
M 30 30
MoveTo 30, 30
m 30 30
moveTo 30, 30
L 30 40
LineTo 30, 40
M 30 30
MoveTo 60, 10
l 30 40
lineTo 30, 40
M 30 30
MoveTo 60, 10
<svg>
<path d="M 20 10 L 30 30 m 0 -30 l 20 10 m 0 30 L 90 10" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M 20 10 H40" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M 20 10 h40" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M 20 40 V30" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M 20 40 v30" stroke="green" stroke-width="3"/>
</svg>
<svg>
<path d="M10 10 h 90 v 20 h -90 v -20"/>
</svg>
<svg>
<path d="M10 10 H 90 v 20 H 10 v -20"/>
</svg>
<svg>
<path d="M10 10 H 90 v 20 H 10 z"/>
</svg>
<svg>
<path d="M10 10 H 90 v 20 H 10 L 10 10"/>
</svg>