Quadratic Bézier Curve

100, 350225, 50350, 350
<svg width="450" height="450" >
<path
d="M 100 350
Start Position
Q 225 50
Control Point
350 350
End Position
"
stroke="#fa3838" stroke-width="20" fill="none"
/>
</svg>

Quadratic Bézier Curve

A quadratic Bézier curve is a simple curve that bends towards a point. In SVG we can use the <path> element with the Q command to draw a curve.

Moving to the starting point

Like most path segments, the quadratic Bézier curve command continues the previous segment. In this example we use the M command to move to the starting point and from there we start the curve.

Drawing a Quadratic Bézier Curve

The Q command requires a control point and an end point.

  1. First we set the control point. The curve bends towards this point.

  2. Then we set the end point. This is where the curve ends.

Styling

Stroke Color

You can set any color value that is valid in CSS. This includes named colors, hex codes, the rgb function and more. Set it to none to hide.

Stroke Width

Set the thickness of the stroke. It can be set to any positive number.

Stroke Linecap

Set the shape to be used at the end of a line or open subpath.

Stroke Linejoin

Set the shape to be used at the corners of paths and basic shapes when they are stroked.

Fill Color

You can set any color value that is valid in CSS. This includes named colors, hex codes, the rgb function and more. Set it to none to hide.