What's wrong in my code (SVG Drawing ...) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

What's wrong in my code (SVG Drawing ...)

Hi, can anyone spot why my code is not running the SVG drawing? <!DOCTYPE > <html> <head> <title> Testando 123</title> </head> <body> <svg width= "200" height="200"> <circle cx="80" cy="50" fill="green"/> </svg> <h1>Where is the SVG circle which should be appearing above?</h1> <h2>Does anyone know why it is not appearing? </h2> <h3> thank you</h3> </svg> </body> </html>

13th Jun 2017, 5:26 AM
[No Name]
[No Name] - avatar
3 Answers
+ 4
>>first HTML5 declaration is wrong:- <!DOCTYPE html> >>second you not define radius for circle:- <circle cx="80" cy="50" r="50" fill="green"/>
13th Jun 2017, 5:34 AM
Rajeev Jain
Rajeev Jain - avatar
+ 4
>>third you don't have to put again the </svg> after <h3></h3>
13th Jun 2017, 6:37 AM
André
André - avatar
+ 2
Hi Rajeev and André Xará (if you are brazilian you know what I mean): Thank you so much! Yep - it was the radius I was missing (HTML5 declaration and the double /svg were typos when transcribing here....
13th Jun 2017, 8:18 PM
[No Name]
[No Name] - avatar