Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Landing Page</title>
  <link rel="stylesheet" href="styles.css">
  <script src="https://kit.fontawesome.com/d6d9dbeb85.js" crossorigin="anonymous"></script>
</head>

<body>
  <header>
    <nav class="navbar">
      <p>Header Logo</p>
      <a href="#header-link-three">header link three</a>
      <a href="#header-link-two">header link two</a>
      <a href="#header-link-one">header link one</a>
    </nav>
  </header>
  <section class="hero">
    <div class="container">
      <div class="hero-left">
        <h1>This website is awesome</h1>
        <p>This website has some subtext that goes here under the main title. It's a smaller font and the
          color
          is
          lower contrast.</p>
        <button type="button"><i class="fa-solid fa-user-plus"></i> Sign up</button>
      </div>
      <div class="image-right">
        <img class="hero-image" src="https://savvystrider-bucket.s3.us-east-2.amazonaws.com/martin.jpg" alt="cool image">
      </div>
    </div>
  </section>
  <section class="random">
    <h2>Some random information.</h2>
    <div class="random-images">
      <figure>
        <img src="https://savvystrider-bucket.s3.us-east-2.amazonaws.com/twitter.jpg" alt="">
        <figcaption>this is some subtext under an illustration or image</figcaption>
      </figure>
      <figure>
        <img src="https://savvystrider-bucket.s3.us-east-2.amazonaws.com/youtube.jpg" alt="">
        <figcaption>this is some subtext under an illustration or image</figcaption>
      </figure>
      <figure>
        <img src="https://savvystrider-bucket.s3.us-east-2.amazonaws.com/instagram.jpg" alt="">
        <figcaption>this is some subtext under an illustration or image</figcaption>
      </figure>
      <figure>
        <img src="https://savvystrider-bucket.s3.us-east-2.amazonaws.com/call.jpg" alt="">
        <figcaption>this is some subtext under an illustration or image</figcaption>
      </figure>
    </div>
  </section>
  <section class="quote">
    <blockquote>This is an inspiring quote, or a testimonial from a customer. Maybe it's just filling up space,
      or maybe people will actually read it. Who knows? All I know is that it looks nice.</blockquote>
    <cite>- Thor, God of Thunder</cite>
  </section>
  <section class="call-to-action">
    <div class="call-left">
      <p class="action-bold">Call to action! It's time!</p>
      <p>Sign up for our product by clicking that button right over there!</p>
    </div>
    <div class="call-right"><button>Sign up</button></div>

  </section>
  <footer>
    <p>Copyright © The Odin Project 2021</p>
  </footer>
</body>

</html>
              
            
!

CSS

              
                * {
    font-family: sans-serif;
    box-sizing: border-box;
    margin: 0;
}

header {
    background-color: #1f2937;
}

.navbar {
    /* position: fixed; */
    /* overflow: hidden; */
    height: 100px;
    background-color: #1f2937;
    width: 100%;
    top: 0;
    left: 0;
}

.navbar p {
    float: left;
    /* padding: 10px; */
    margin-top: 30px;
    color: white;
    padding-left: 100px;
    font-size: 24px;
    color: #F9FAF8;
    font-weight: 700;
}

.navbar a {
    text-decoration: none;
    float: right;
    /* padding: 10px; */
    margin-top: 30px;
    display: block;
    font-size: 24px;
    color: #F9FAF8;
    padding-right: 100px;
}

.hero {
    background-color: #1f2937;
    width: 100%;
    overflow: hidden;
    height: 400px;
    padding-left: 100px;
    line-height: 1.5;
}

.hero p {
    color: #e5e7eb;
    font-size: 18px;
}

h1 {
    font-size: 48px;
    font-weight: bolder;
    color: #F9FAF8;
}

button {
    background-color: #3882f6;
    color: #F9FAF8;
    /* padding: 20px; */
    text-align: center;
    display: inline-block;
    border-radius: 25px;
    width: 120px;
    height: 45px;
    font-size: 18px;
    margin-top: 15px;
    position: relative;
}

button:active {
  top: 2px;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: baseline;
    /* gap: 500px; */
    /* padding-left: 1px; */
}

.hero-image {
    width: 700px;
    height: auto;
    border: 5px solid rgba(56, 130, 246, 0.9);
    border-radius: 25px;
}

.hero-left {
    /* display: flex; */
    /* flex-direction: row; */
    align-self: flex-start;
    order: 1;
    /* gap: 50px */
}

.image-right {
    /* display: flex; */
    align-self: flex-end;
    /* flex-direction: row; */
    order: 2;
    /* gap: 50px; */
    padding-right: 100px;
}

.random {
    margin-top: 100px;
}

.random h2 {
    text-align: center;
    font-size: 36px;
    font-weight: bolder;
    color: #1f2937;
    margin-bottom: 50px;
}

.random-images {
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-bottom: 50px;

}

figure img {
    width: 200px;
    height: auto;
    border: 5px solid #3882f6;
    border-radius: 25px;
    object-fit: cover;
    margin-bottom: 25px;
}

figcaption {
    display: block;
}

.quote {
    background-color: #e5e7eb;
    padding-left: 325px;
    padding-right: 325px;
    padding-top: 200px;
    padding-bottom: 200px;
    margin-top: 100px;
    margin-bottom: 100px;
}

blockquote {
    font-size: 36px;
    font-style: italic;
    color: #1f2937;
    margin-bottom: 50px;
}

cite {
    font-weight: bold;
    margin-left: 1000px;
    font-size: 20px;
}

.call-to-action {
    background-color: #3882f6;
    color: white;
    width: 60%;
    height: auto;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-left: 400px;
    margin-bottom: 160px;
    /* color: #e5e7eb; */
    font-size: 18px;
    border-radius: 20px;
}

.call-left {
    padding-left: 100px;
    padding-top: 30px;
    padding-bottom: 30px;
}

.call-right {
    padding-right: 100px;
    margin-top: 10px;

}

.call-right button {
    /* margin-right: 50px; */
    border: 2px solid #F9FAF8;
}

.action-bold {
    font-weight: 700;
    text-align: left;
    font-size: px;
}

footer {
    background-color: #1f2937;
    height: 100px;
}

footer p {
    color: #F9FAF8;
    text-align: center;
    font-size: 18px;
    padding-top: 40px;
}
              
            
!

JS

              
                
              
            
!
999px

Console