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>

<main id="main">
  <h1 id="title">
    M.S DHONI
    </h1>
      <div id="img-div">
        <img id="image"
         
          src="https://cdn.dnaindia.com/sites/default/files/styles/full/public/2019/07/23/851289-ms-dhoni-1-afp.jpg" alt="m.s dhoni">
        <div id="img-caption">
          MAHENDRA SINGH DHONI
          </div>
        
      </div>
      <div id="tribute-info">
        <h2>Top 10 achievements of MS Dhoni</h2>
       <ul>
         <li>
            MS Dhoni is the only Indian captain who has led India to all three major ICC events. From winning the maiden T20 World Cup in 2007 on his captaincy debut to lead India to a World Cup victory on home soil in 2011. In 2013 he has won the Champions Trophy.
         </li><hr>
         <li>
          Under his captaincy, India holds the numero uno position in Test ranking for 18 months.
          </li><hr>
         <li>MS Dhoni is the only non-Australian captain who has led his team more than 100 matches.  He is also the third captain to have won the 100 matches after two Australian captains after Ricky Ponting and Allan Border.</li><hr>
         <li> Dhoni is the fourth fastest batsman who has completed  8000 runs in New Zealand fifth and final match.</li><hr>
         <li>In 2013 Champions Trophy Dhoni has won the Champions Trophy which made Dhoni have all three ICC trophies in his kitty. In the Champions Trophy India was the only team who were unbeaten. In the final, India defeated England by 5 runs.</li><hr>
         <li>On November 1, 2011, the Indian Territorial Army conferred with honorary rank Lieutenant Colonel to Dhoni after which Dhoni has become the only captain after Kapil Dev to receive this prestigious award.</li><hr>
         <li>2008 and 2009 Dhoni was awarded the ICC Player of the Year trophy.</li><hr>
         <li>In 2011, 2012 and 2013 under Dhoni captaincy, India was named as ICC team of the year.</li><hr>
         <li>Dhoni has won the Rajiv Gandhi Khel Ratna award in 2007.</li><hr>
         <li> 2011 CNN-IBN Indian of the Year in Sports.</li><hr>
       </ul>
         <h4>
      To learn more about this Legend click to his
      <a
        id="tribute-link"
        href="https://en.wikipedia.org/wiki/MS_Dhoni"
        target="_blank"
        >Wikipedia entry</a
      >.
    </h4>
       
        
        
        </div>
</main>
              
            
!

CSS

              
                html
{
  font-size: 10px ;
}
body
{
 font-family: cursive;
  background-color: #b0c4de;
  text-align: center ;
  font-size: 2rem;
  line-height:1.4;
  margin:0;
}
h1 
{
  font-size:3em;
  margin-bottom:0;
}
@media (max-width:450px)
{
  h1
  {
    font-size:2.7rem;
    line-height:1.3;
  }
}
h2
{
  font-size:2.5em
}
#main
{
  margin:35px 8px;
  padding: 10px;
}
@media (max-width:450px)
{
  #main
  {
    margin:0;
  }
}
img 
{ 
 max-width:85%;
 display:block;
 margin: 0 auto;
 height: auto;
 box-shadow: 5px 5px 3px 3px grey;
 border-radius: 10%; 
}
#img-div
{ 
  padding:10px;
  margin:0;
}
#img-caption
{
  margin: 25px 0 20px 0 ;
  font-size: 1.5em;
}
@media (max-width:450){
  #img-caption
  {
   font-size: 1rem ;
  }
}
ul
{
  max-width: 990px;
  margin:0 auto 50px auto;
  text-align:left;
  line-height:1.8;
  
}
li{
  margin: 20px;
}
              
            
!

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