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

              
                <nav id="navbar">
  <ul>
    <li>
      <a href="#welcome-section">
        About
      </a>
    </li>
    <li>
      <a href="#projects">
        Work
      </a>
    </li>
    <li>
      <a href="#contacts">
        Contact
      </a>
    </li>
  </ul>
</nav>
<section id="welcome-section">
  <h1>Hi! I'm Siddharth Roy</h1>
  <h2>
    &lt;!-- A self taught front-end
    developer --&gt;
  </h2>
</section>
<section id="projects">
  <h2>
    Let's get straight to my 
    projects
  </h2>
  <div id="projects-grid">
    <div class="project-tile">
      <a href="https://codepen.io/siddharthroy12/full/dyMmzZJ" target="_blank">
        <img alt="project thumbnail" src="https://codepen.io/siddharthroy12/pen/dyMmzZJ/image/large.png"/>
        <p>
          Tribute Page
        </p>
      </a>
    </div>
    <div class="project-tile">
      <a href="https://codepen.io/siddharthroy12/full/ExKRWPq" target="_blank">
        <img alt="project thumbnail" src="https://codepen.io/siddharthroy12/pen/ExKRWPq/image/large.png"/>
        <p>
          Technical Doc Page
        </p>
      </a>
    </div>
    <div  class="project-tile">
      <a href="https://codepen.io/siddharthroy12/full/oNxqKOE" target="_blank">
        <img alt="project thumbnail" src="https://codepen.io/siddharthroy12/pen/oNxqKOE/image/large.png"/>
         <p>
          Survey Page
         </p>
      </a>
    </div>
    <div class="project-tile">
      <a href="https://codepen.io/siddharthroy12/full/YzqLYga" target="_blank">
        <img alt="project thumbnail" src="https://codepen.io/siddharthroy12/pen/YzqLYga/image/large.png"/>
          <p>
           Landing Page
          </p>
      </a>
    </div>
  </div>
</section>
<section id="contacts">
  <h2>Get in touch</h2>
  <ul>
    <li>
      <a>
        <i class="fas fa-at">
        </i>Email
      </a>
    </li>
    <li>
      <a><i class="fas fa-phone">
        </i>Call
      </a>
    </li>
    <li>
      <a href="https://github.com/siddharthroy12">
        <i class="fab fa-github">
        </i>Github
      </a>
    </li>
    <li>
      <a id="profile-link" target="_blank" href="https://www.freecodecamp.org/fcc6673c75e-6303-4ca7-bd6a-414ab33e80f6">
        <i class="fab fa-free-code-camp"></i>FCC
      </a>
    </li>
  </ul>
</section>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Fira+Mono&family=Open+Sans&display=swap');

body {
  margin:0px;
  padding:0px;
}

#navbar {
  position:fixed;
  display:flex;
  justify-content:flex-end;
  top:0;
  left:0;
  width:100%;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
  background:#2A3C4E;
  padding: 1px 0px;
  font-family: 'Open Sans', sans-serif
}

#navbar ul {
  display:flex;
  flex-direction:row;
  list-style:none;
  justify-content:flex-end;
  padding:0 20px;
}

#navbar li {
  color: white;
  margin:0px 16px;
}

#navbar a {
  font-size:1.2rem;
  color:white;
  text-decoration:none;
}

#welcome-section {
  height:100vh;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  background:#BE3144;
  font-family: 'Fira Mono',
                monospace;
  color:white;
}

#welcome-section h1 {
  text-align:center;
  font-size: 2.3rem;
  margin:3px 0px;
}

#welcome-section h2 {
  text-align:center;
  font-size: 1.1rem;
  font-weight: 100;
}

#projects {
  display:flex;
  flex-direction:column;
  align-items: center;
  justify-content: center;
  background:#15A084;
  padding:0px 50px;
}

#projects h2 {
 font-family:'Open Sans', sans-serif;
 color:white;
 text-align:center;
 font-size: 2rem;
 margin:50px 0 50px 0;
}

#projects #projects-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap:50px;
  row-gap:50px;
  margin:0 0 100px 0;
}

.project-tile {
  border-color:#BE3144;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  background:#BE3144;
  border-radius: 3px;
  
}

.project-tile img {
  display:block;
  width:100%;
  object-fit:cover;
  height:100%;
}

.project-tile a { 
  display:block;
  flex-direction:column;
  color: white;
  text-decoration:none;
}

.project-tile p {
  text-align:center;
  font-family:'Open Sans', sans-serif;
  color:white;
  background:#BE3144;
  font-size:1.3rem;
  font-weight:200;
  margin:auto;
  padding:25px 0px;
  line-height:50px;
  height:50px;
}

#contacts {
  height:100vh;
  background:#BE3144;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  color:white;
  gap:40px;
}

#contacts h2 {
  font-size: 3rem;
  font-family:'Open Sans', sans-serif;
}

#contacts ul {
  display:flex;
  list-style:none;
  justify-content:center;
  padding:0px 50px;
}

#contacts li {
  margin:0px 30px;
}

#contacts a {
  color:white;
  text-decoration:none;
  font-family:'Open Sans', sans-serif;
  font-size: 1.2rem;
}

#contacts i {
  margin:10px;
}

@media (max-width:800px) {
  
  #projects #projects-grid {
    grid-template-columns: 1fr;
    margin:0 0 100px 0;
   }
  
  #navbar {
    justify-content:center;
   }
}

@media (max-width:500px) {
  #welcome-section h1 {
   text-align:center;
   font-size: 1.5rem;
   margin:13px 10px;
  }
  #welcome-section h2 {
   text-align:center;
   font-size: .9rem;
   font-weight:100;
   margin:10px
  }
  #projects h2 {
   font-size: 1.5rem;
  }
  
  .project-tile p {
    font-size: 1rem;
    height:50px;
  }
  #contacts {
    height:500px;
  }
  #contacts h2 {
    font-size: 2rem;
    margin-top:10px;
  }
  #contacts ul {
    flex-direction:column;
  }
  #contacts li {
    margin:10px 0px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console