Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<head>
  <style>
@import url('https://fonts.googleapis.com/css?family=Uncial+Antiqua');
</style>
</head>
<div id="main">
  <h1 id="title">The Tale of Years</h1>
  <div id="sub">Chronology of the War of the Ring</div>
  <div id="img-div">
    <img id="image" src="https://townsquare.media/site/622/files/2012/12/iamnomanbybreathing2004-d5jqf0e.jpg" alt "artwork by Jian Guo">
    <div id="img-caption">
The Battle of Pelennor Fields is the battle for the city of Minas Tirith between the forces of Gondor and its allies, and the forces of the Dark Lord Sauron.
    </div>
  </div>
  <br>
  <div id="tribute-info">
    <ul>
      <h3 id="headline"> What happened to the Ring from its forging to the end of the War of the Ring:</h3>
      <strong><h4>Second Age</h4></strong>
    <br><strong>c. 1600:</strong> Forging of the One Ring
    <br><strong>2251:</strong> The Ringwraiths first appear.
    <br><strong>3319:</strong> Númenor is drowned, and the world is made round; Elendil and his sons arrive on the shores of Middle-earth in nine ships.
<br><strong>3320:</strong> Founding of Gondor and Arnor by Elendil and his sons, Isildur and Anárion
    <br><strong>3441:</strong> Elendil and Gil-galad face Sauron in hand-to-hand combat, but they themselves perish; Isildur takes the shards of his father's sword Narsil and cuts the One Ring from Sauron's finger. Sauron's physical form is destroyed and the Barad-dûr is razed to the ground. In the aftermath of the War, many Elves of Gil-galad's following depart to Valinor: end of the Noldorin realms in Middle-earth.<br>
      <strong><br><h4>Third Age</h4></strong>
    <br><strong>TA 2</strong> Death of Isildur, the One Ring is lost
    <br><strong>2463:</strong> Sméagol (later known as Gollum) becomes the fourth bearer of the One Ring, after killing his cousin Déagol
    <br><strong>'July' 2941:</strong> Bilbo Baggins obtains the One Ring
    <br><strong>3001:</strong> Bilbo Baggins turns 111, passes the One Ring on to Frodo Baggins, and leaves the Shire. From now on Aragorn and Gandalf intermittently hunt Gollum
    <br><strong>3014:</strong> Saruman begins using his influence to weaken Théoden, king of Rohan
<br><strong>3017:</strong> Gollum is released from Mordor; Aragorn finally tracks him down in the Dead Marshes, and brings him as a captive to King Thranduil's halls in Mirkwood
    <br><strong>3018</strong>
The Ringwraiths are given the task of retrieving the One Ring
<br><strong>'April' 12:</strong> Gandalf reaches Hobbiton in the Shire, telling Frodo Baggins he must take the Ring away.
<br><strong>'June' 20:</strong> Sauron attacks Osgiliath.
<lbr><strong>Mid-year's Day:</strong> Gandalf, now in Bree, writes his letter to Frodo.
<br><strong>'July' 4:</strong> Boromir leaves Minas Tirith
<br><strong>'July' 10:</strong> Saruman imprisons Gandalf in Orthanc
<br><strong>'September' 18:</strong> Gandalf escapes from Orthanc
<br><strong>'September' 19–23:</strong> Gandalf reaches Edoras and takes Shadowfax the horse
<br><strong>'September' 23:</strong> Frodo leaves Bag End
<br><strong>'September' 26:</strong> Frodo meets Tom Bombadil
<br><strong>'September' 29:</strong> Aragorn meets Frodo in the Inn of the Prancing Pony in Bree.
<br><strong>'October' 6:</strong> Frodo wounded at Weathertop
<br><strong>'October' 20:</strong> Frodo crosses the ford of Bruinen
<br><strong>'October' 25:</strong> Council of Elrond at Rivendell
<br><strong>'December' 25:</strong> The Fellowship of the Ring sets out in the evening from Rivendell
<br><strong>3019'January' 15:</strong> Gandalf falls in Khazad-dûm while fighting a Balrog.
<br><strong>'February' 25:</strong> The Fellowship passes the Argonath and camp at Parth Galen. First Battle of Fords of Isen; Théodred son of Théoden is slain.
<br><strong>'February' 26:</strong> The breaking of the Fellowship; Boromir is killed.
<br><strong>'February' 29:</strong> Merry and Pippin escape the orcs and meet Treebeard.
<br><strong>'March' 1:</strong> Aragorn, Legolas and Gimli meet the resurrected Gandalf the White in Fangorn Forest while looking for Merry and Pippin, and they head off for Edoras. Frodo and Sam begin travelling through the Dead Marshes with Gollum.
<br><strong>'March' 3:</strong> Battle of the Hornburg.
<br><strong>'March' 5:</strong> Rohan's army reaches Isengard.
<br><strong>'March' 7:</strong> Faramir takes Frodo and Sam to Henneth Annûn.
<br><strong>'March' 8:</strong> Aragorn, Legolas and Gimli enter the Paths of the Dead.
<br><strong>'March' 9:</strong> Gandalf and Pippin arrive in Minas Tirith.
<br><strong>'March' 10:</strong> Frodo and Sam see the Morgul host led by the Witch-king leave Minas Morgul. An army from the Morannon takes Cair Andros and enters Anórien.
<br><strong>'March' 11: </strong>First assault on Lórien by Dol Guldur.
<br><strong>'March' 12:</strong> Gollum leads Frodo into Shelob's lair.
<br><strong>'March' 13:</strong> Frodo captured by Cirith Ungol orcs. Aragorn captures the Umbar fleet at Pelargir.
<br><strong>'March' 15:</strong> Witch-king breaks the gate of Minas Tirith in the early hours. Denethor burns himself on a pyre. Confrontation between Gandalf and the Witch-king at the gate; Horns of the Rohirrim are heard at a cockcrow. Battle of the Pelennor Fields: Théoden King of Rohan is killed by the Witch-king; Éomer succeeds him as the eighteenth king of Rohan. Éowyn and Merry kill the Witch-king. Aragorn, Rangers, the sons of Elrond and men from the southern fiefdoms of Gondor arrive in the black ships and turn the tide of battle. Sam and Frodo escape and journey along the Morgai. Battle under the trees in Mirkwood; second assault on Lórien.
<br><strong>'March' 16:</strong> Debate of the Captains of the West.
<br><strong>'March' 17:</strong> Battle of Dale. King Brand and Dáin Ironfoot fall in battle against invading Easterlings. Many Men and Dwarves take refuge in Erebor.
<br><strong>'March' 18:</strong> Armies leave Minas Tirith. Frodo and Sam join the orc company.
<br><strong>'March' 22:</strong> Third assault on Lórien.
<br><strong>'March' 25:</strong> The Host is surrounded on the slag-hills. Frodo and Sam reach the Sammath Naur. Gollum (Sméagol) seizes the One Ring and falls into the Cracks of Doom. Downfall of Barad-dûr and the passing of the Dark Lord Sauron.
<br><strong>'March' 28:</strong> Celeborn leads his forces in the attack and destruction of the fortress of Dol Guldur. Galadriel throws down its walls to cleanse Mirkwood of its evil.
<br><strong>'May':</strong> Arwen Undómiel and her father Lord Elrond of Imladris arrive in Lórien, where they are welcomed at Caras Galadhon by the Lady Galadriel and Lord Celeborn, grandparents of Lady Arwen through her mother, the Lady Celebrían.
<br><strong>'May':</strong> Aragorn is crowned King Elessar of the Reunited Kingdom of Arnor and Gondor. Gandalf helps Aragorn to find the sapling of the new White Tree.
<br><strong>Mid-year's Day (between 'June' and 'July'):</strong> Aragorn marries Arwen Undómiel.
<br><strong>'August' 10:</strong> King Théoden is laid to rest beside other Kings of Rohan in Edoras. Faramir and Éowyn formally engage to marry.
<br><strong>'September' 21:</strong> the four hobbits arrive back in Rivendell.
<br><strong>'September' 22:</strong> Saruman arrives in the Shire.
<br><strong>'November' 1:</strong> the four hobbits arrested at Frogmorton.
<br><strong>'November' 3:</strong> Battle of Bywater; death of Saruman and Wormtongue, final end to the War of the Ring.
    </ul>
    <a id="tribute-link" href="https://lotr.fandom.com/wiki/Timeline_of_Arda" target="_blank">For a more detailed timeline click here</a>
  </div>
</div>
              
            
!

CSS

              
                *{
  box-sizing: border-box;
}
html{
  background-image: url("http://www.globalsupportinitiative.com/wp-content/uploads/large-map-of-middle-earth-world-maps-new-arabcooking-me-9.jpg");
  background-size: 100%;
}
html, body {
  font-family: 'Uncial Antiqua', cursive;
  color: #5E2215;
  text-align: center;
}
#main{
  background: RGB(255, 228, 181, 0.6);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0px;
  border: 5px solid #5E2215;
}
#title{
  text-align: center;
}
#sub{
  text-align: center;
}
#img-div{
  width:100%;
  max-width: 614px;
  margin: 20px auto 0 auto;
  border:5px solid #5E2215;
}
#img-caption{
  text-align: center;
  padding: 0 15px;
  background:RGB(255, 228, 181, 0.6);
  border-top:5px solid #5E2215;
}
img{
  max-width: 100%; 
  display: block; 
  height: auto;
  margin: auto;
  border-top: 15px solid white;
  border-left: 15px solid white;
  border-right: 15px solid white;
}
#headline{
  text-align: justify;
}
ul{
  max-width:614px;
  border: 5px solid #5E2215;
  margin: auto;
  text-align: justify;
  padding: 0px 15px;
  background: RGB(255, 228, 181, 0.6);
}
@media (max-width: 657px){
  ul, #img-div{
    border-left: 5px;
    border-right: 5px;
    }
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console