HTML5 > Structures

SVG Graphics in HTML5

How to define graphics for the webpage in HTML5?


SVG stands for Scalable Vector Graphics, by using <svg> tag we can define the graphics for the web.

<body>
    <h2>HTML5 SVG Rectangle - Scalable Vector Graphics</h2>
    <svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">
        <rect id="redrect" width="300" height="100" fill="red" />
    </svg>
</body>

Output

The above output shows the SVG rectangle, we can make the different types of shapes like (star, Square, cone, circle, etc.).

 Views: 4751 | Post Order: 79



Write for us






Hosting Recommendations