0

Why is the 2. rectangle not displayed?

<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <svg width="500" height="500"> <rect width="100" height="50" x="0" y="0"> <rect width="100" height="50" x="0" y="50" fill="green"> </svg> </body

12th Jan 2021, 10:48 PM
Shinichi
Shinichi - avatar
3 Réponses
+ 9
You have to close both rect tags. <rect your code />
13th Jan 2021, 2:10 AM
Simba
Simba - avatar
+ 7
Missing "/" before ">" in first svg tag
12th Jan 2021, 11:20 PM
Abhay
Abhay - avatar
+ 1
Oh wow thanks a lot to you both! I thought the “/“ would be optional similar to the <br> tag. Finally I see the mistake
13th Jan 2021, 10:07 AM
Shinichi
Shinichi - avatar