HTML Academy
Challenge: Target
An Introduction to SVG10/15
Back to the list of tasks
  • 1. Hello, SVG!
  • 2. Drawing a Rectangle
  • 3. Rectangle Coordinates
  • 4. Corner Rounding
  • 5. Challenge: Fixing the TV
  • 6. Polygons
  • 7. Challenge: Pyramids
  • 8. Drawing a Circle
  • 9. Challenge: Target
  • 10. Drawing an Ellipse
  • 11. Challenge: Surprised Smiley
  • 12. Drawing Lines
  • 13. Challenge: Arithmetic Operators
  • 14. Drawing Polylines
  • 15. Challenge: Hot-Air Balloons
Challenge: Surprised Smiley
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Drawing an Ellipse

An ellipse is drawn in much the same way as a circle, but it has two radii: rx along the horizontal axis and ry along the vertical axis.

<ellipse rx="30" ry="40%"/>

You can specify the position of an ellipse or a circle using cx andcy.

<ellipse rx="30" ry="40%" cx="50%" cy="50%"/>

Comments

  • object.svg
  • style.css
SVG
<svg> </svg>
CSS
svg { border: 1px solid #dddddd; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Draw an ellipse with a radius that has a horizontal offset of 40% and a radius with a vertical offset of 30.
    2. Move the shape by setting cx to 50% and cy to 80%.
    3. Add green fill by specifying yellowgreen.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.