Skip to main content

Command Palette

Search for a command to run...

HTML SVG Graphics

Published
•1 min read•View as Markdown
HTML SVG Graphics
S

A passionate Full Stack Software Developer 🚀 having an experience of building Web applications with JavaScript and some other cool libraries and frameworks.

SVG defines vector-based graphics in XML format.

  • SVG stands for Scalable Vector Graphics

  • SVG is used to define graphics for the Web

  • SVG is a W3C recommendation

The HTML <svg> Element

The HTML <svg> element is a container for SVG graphics.

SVG has several methods for drawing paths, boxes, circles, text, and graphic images.

Example:

<!DOCTYPE html>
<html>
<body>

<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>

</body>
</html>

More from this blog

Shubham's blog

66 posts