Loading...
HTML <svg> Tag

HTML <svg> Tag

In this tutorial, we will learn about svg tag in HTML with the help of examples.


<svg> Tag

Svg tag <svg> is used to defines a container for SVGs(Scalable Vector Graphics).

Syntax

<svg>..........</svg>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Svg Tag</title>
  </head>
  <body>
    <svg width = "100" height = "100">
      <circle cx = "50" cy = "50" r = "30" stroke = "black" stroke-width = "4" fill = "yellow"/>
    </svg>
  </body>
</html>

Output


Global Attribute

Svg Tag support all the global attributes of HTML.


Event Attribute

Svg Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of <svg> tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML <table> Tag.

- Related Topics