Draw a square using HTML5 SVG, fill that square with yellow color and make a 5px blue stroke width
belongs to collection: HTML5 programming Exercises
All Answers
total answers (1)
belongs to collection: HTML5 programming Exercises
total answers (1)
Solution
SVG stands for Scalable Vector Graphics. It is W3C recommended. The graphics in SVG are defined in XML format. It is an open standard that has been actively developed by the W3C. SVG generated graphics are vector based that require less storage space and image can be scaled up or down without the loss of quality. It is supported by all major browsers.
Each element of SVG is part of the DOM, it can be styled with CSS and add behavior with the SVG DOM.
This is the following HTML5 code to draw a square with 5px blue stroke width and filled with yellow color.
Output of the above code -
![](https://nerdutella.com/assets/dropzone/uploads/tinymce_images/questions/4069/answers/blobid0.png)
need an explanation for this answer? contact us directly to get an explanation for this answer