Sun, Earth, and Code
Prepare to orbit the sun

The next couple of steps are going to be a little tricky, so hang in there. You can do this!

Remember when we used absolute positioning for our planets (hint: exercise 3)? Earth's orbit will be similar.

Let's make an HTML element that will represent earth's orbit.


Make the earth a child of its own orbit.

  1. Locate the <img id="earth"> tag.

  2. Surround the Earth image with its orbit by adding a <div id="earth-orbit"> tag.

  3. Edit your index.html to match:

    <div id='earth-orbit'>
        <img id='earth' src="http://goo.gl/41IWnf">
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

Remember to close the <div id='earth-orbit> tag by adding a </div> tag. Take special note of the backslash (i.e., '/') in </div>.

Closing html tags always follow the following convention:

  ... children tags ...
View Preview