
HTML
HTML Head
HTML Forms
HTML Graphics
HTML Media
HTML APIs
HTML SVG
SVG (Scalable Vector Graphics) is an XML-based markup used to create shapes, icons, charts, and illustrations directly in HTML. It scales without losing quality, making it ideal for modern responsive designs.
What is SVG?
SVG allows vector graphics to be embedded and styled directly in HTML. Since it is text-based, it can be searched, styled with CSS, and even animated with JavaScript.
Basic SVG Syntax
SVG graphics are written using tags inside the <svg> element. Each shape is represented by a specific tag such as <circle>, <rect>, or <line>.
Common SVG Shapes
Circle
Rectangle
Line
Text in SVG
Text can be displayed inside SVG using the <text> element.
Styling SVG with CSS
SVG elements can be styled using CSS, either inline or through a stylesheet
Why Use SVG?
- Sharp and clear at any resolution
- Small file size for simple graphics
- Can be animated and styled
- Works well with HTML and CSS
SVG is a powerful and flexible way to create graphics using HTML. It is ideal for logos, icons, charts, and scalable designs. With basic shapes and styling, clean visuals can be added to any web project.