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

              
                <!DOCTYPE html>
<html lang="en">
  <head>
    <link href="" rel="stylesheet">
    <title></title>
  </head>
  <body id="main"><!--User Story 1-->
    <header id="title"><!--User Story 2-->
      <h1>Rafa Nadal</h1>
      <p>The Grand Slam Man</p>
      <div id="img-div"><!--User Story 3-->
        <img id="image" src="https://i.ibb.co/Fwk09Rz/rnadal.jpg" alt="rafa nadal bakhand"/><!--User Story 4-->
        <p id="img-caption">Rafa's famous backhand</p><!--User Story 5-->
      </div>
    </header>  
    <article id="tribute-info"><!--User Story 6-->
      <h3>Timeline of Rafa's Grand Slams</h3>
              <table>
          <tr>
            <th>Result</th>
            <th>Year</th>
            <th>Tournament</th>
            <th>Surface</th>
            <th>Opponent</th>
          </tr>
          <tr>
            <td>Win</td>
            <td>2005</td>
            <td>French Open</td>
            <td>Clay</td>
            <td>Mariano Puerta</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2006</td>
            <td>French Open (2)</td>
            <td>Clay</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2006</td>
            <td>Wimbledon</td>
            <td>Grass</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2007</td>
            <td>French Open (3)</td>
            <td>Clay</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2007</td>
            <td>Wimbledon</td>
            <td>Grass</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2008</td>
            <td>French Open (4)</td>
            <td>Clay</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2008</td>
            <td>Wimbledon</td>
            <td>Grass</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2009</td>
            <td>Australian Open</td>
            <td>Hard</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2010</td>
            <td>French Open (5)</td>
            <td>Clay</td>
            <td>Robin Söderling</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2010</td>
            <td>Wimbledon (2)</td>
            <td>Grass</td>
            <td>Tomáš Berdych</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2010</td>
            <td>US Open</td>
            <td>Hard</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2011</td>
            <td>French Open (6)</td>
            <td>Clay</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2011</td>
            <td>Wimbledon</td>
            <td>Grass</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2011</td>
            <td>US Open</td>
            <td>Hard</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2012</td>
            <td>Australian Open</td>
            <td>Hard</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2012</td>
            <td>French Open (7)</td>
            <td>Clay</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2013</td>
            <td>French Open (8)</td>
            <td>Clay</td>
            <td>David Ferrer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2013</td>
            <td>US Open (2)</td>
            <td>Hard</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2014</td>
            <td>Australian Open</td>
            <td>Hard</td>
            <td>Stan Wawrinka</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2014</td>
            <td>French Open (9)</td>
            <td>Clay</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2017</td>
            <td>Australian Open</td>
            <td>Hard</td>
            <td>Roger Federer</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2017</td>
            <td>French Open (10)</td>
            <td>Clay</td>
            <td>Stan Wawrinka</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2017</td>
            <td>US Open (3)</td>
            <td>Hard</td>
            <td>Kevin Anderson</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2018</td>
            <td>French Open (11)</td>
            <td>Clay</td>
            <td>Dominic Thiem</td>
          </tr>
          <tr>
            <td>Loss</td>
            <td>2019</td>
            <td>Australian Open</td>
            <td>Hard</td>
            <td>Novak Djokovic</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2019</td>
            <td>French Open (12)</td>
            <td>Clay</td>
            <td>Dominic Thiem</td>
          </tr>
          <tr>
            <td>Win</td>
            <td>2019</td>
            <td>US Open (4)</td>
            <td>Hard</td>
            <td>Daniil Medvedev</td>
          </tr>
        </table>
    </article>
    <footer>
      <p>If you have the time you should definately read Rafa's <a id="tribute-link" href="https://en.wikipedia.org/wiki/Rafael_Nadal" target="_blank">Wikipedia</a> page</p>
    </footer>
  </body>
</html>
              
            
!

CSS

              
                /*MAIN BACK-DROP, GENERAL FORMATTING*/
/*User Story 1*/
#main{
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background-color: white;
  margin: auto; /*centers the whole site*/
  text-align: center; /*centers the whole site*/
}
/*HEADING UNTIL END OF PHOTOGRAPH*/
header{
  background: #eee;
  margin-top: 20px;
  margin-right: 10px;
  margin-left: 10px;
  border: 1px solid #eee;
}
/*User Story 2*/
#title p{
  font-style: italic;
}
/*User Story 3*/
#img-div{
  background: white;
  padding: 15px;/*spacing of white box*/
  margin: 15px;/*white box*/
  border-radius:5%
}
/*User Story 4*/
#image{
  display: block;/*User Story 8, makes image responsive*/
  max-width: 100%; /*User Story 8, makes image responsive*/
  height: auto; /*User Story 8, makes image responsive*/
  margin: auto;/*User Story 9, makes image responsive*/
}
/*User Story 5*/
#img-caption{
  margin-top: 0px; /**/
  margin-bottom: 0px;
}
/*MAIN ELEMENT*/
/*User Story 6*/
#tribute-info{
  padding-bottom: 50px;/*spacing*/
  background-color: #eee;
  margin: 0px 10px 0px 10px;
  border: 1px solid #eee;
}
#tribute-info table {
  margin: auto;/*centers table*/
  border-collapse: collapse; /*allows solid borders*/
}
#tribute-info th, td{
  padding: 30px; /*Makes space within cells and rows*/
  border-bottom: 1px solid black; 
}
@media (max-width: 660px){/*Adapts to screens, table goes wrong as from 660px*/
  #tribute-info{
    margin: 0px;/*eliminate margin*/
  }
  #tribute-info th, td{
    padding: 1px;/*makes space smaller*/
  }
}
/*BOTTOM OF PAGE*/
footer{
  background-color:white;
  margin-top: 25px;
}
              
            
!

JS

              
                
              
            
!
999px

Console