Rectangle
Next ❯Circle
- turned_in_notRectangle Related Tag
<rect>
<rect>
Used to draw a rectangle or square on svg, default fill color is black
- For square, set width = height
Basic Rectangle
Circular Rectangle
Syntax - For basic rectangle
<rect x="point" y="point" width="length" height="length" />
Syntax - For circular rectangle
<rect x="point" y="point" rx="length" ry="length" width="length" height="length" />
- label_outlineRectangle Attributes
- x - Start point at x-axis
- y - Start point at y-axis
- rx - Radius of all corners along x-axis
- ry - Radius of all corners along y-axis
- width - Width length of rectangle
- height - Height length of rectangle
<svg height="100" width="200">
<rect x="10" y="10" width="180" height="80"
style="stroke:red;fill:#ffe1b4;"/>
</svg>
Basic Rectangle
<svg height="100" width="200">
<rect x="10" y="10" rx="20" ry="20" width="180"
height="80" style="stroke:red;fill:#ffe1b4;"/>
</svg>
Circular Rectangle
❮ Prev Line
Next ❯Circle