HTML with SVG to draw rectangle



            html with SVG tag. It stands for scalable vector graphics.It is used for vector based graphics in XML. We use this tag for graphics on web/page.

        <svg width="100" height="100">
            <!--we always use svg for image size. If we donot, it takes 0,0 by default-->

            <rect width="300" height="200" stroke="purple" stroke-width="4px" fill="green"/>
        <!--since we are going to draw rectangle, we use attributes-->
        <!-- here width is the length ,height is breadth, stroke is boundary color,stroke-width means width of rectangle outline 
            and fill means color inside rectangle-->



No comments:

Post a Comment