The <polygon> element is used to create a graphic that contains at least three sides:
Here is the SVG code:
For Opera users: View the SVG file (right-click on the SVG graphic to view the source).
Code explanation:
The following example creates a polygon with four sides:
Here is the SVG code:
For Opera users: View the SVG file (right-click on the SVG graphic to view the source).
Use the <polygon> element to create a star:
Here is the SVG code:
For Opera users: View the SVG file (right-click on the SVG graphic to view the source).
Change the fill-rule property to "evenodd":
Here is the SVG code:
For Opera users: View the SVG file (right-click on the SVG graphic to view the source).
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|