HTML with SVG to draw path



            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 viewbox="0 0 200 200"><!--</svg><svg width="100" height="100">-->
            <!--we always use svg for image size. If we donot, it takes 0,0 by default-->

            <path d="M20 50 L100 20 L200 70 Z" stroke="green" stroke-width="15" fill="red" />
        <!--since we are going to Path, we use attributes-->
        <!-- here, 'd' is a string containing a series of path commands that define the path to be drawn.
           ->M moves to particular point
           ->L lines to particular point
           ->Z means close the path.
           -> stroke is boundary color,stroke-width means width of path outline 
            and fill means color inside path.



No comments:

Post a Comment