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>
<head>
    <title>My Simple Blog</title>
</head>
<body>
    <header>
        <h1>My Blog</h1>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <article>
            <h2>Blog Post Title</h2>
            <p>Content of the first blog post...</p>
        </article>
        <article>
            <h2>Another Blog Post</h2>
            <p>Content of the second blog post...</p>
        </article>
        <!-- More articles can be added here -->
    </main>
    <footer>
        <p>© 2023 My Simple Blog</p>
    </footer>
</body>
</html>

              
            
!

CSS

              
                body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; /* Light background for the entire page */
}

header {
    background-color: #6a1b9a; /* Vibrant purple header */
    color: #ffffff;
    text-align: center;
    padding: 1em 0;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

main {
    margin: 20px;
    background-color: #ffffff; /* White background for the main content */
    padding: 20px;
    border-radius: 8px; /* Rounded corners for the main content area */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

article {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee; /* Separator for articles */
}

article h2 {
    color: #333333; /* Dark text for titles */
    margin-bottom: 10px;
}

article p {
    color: #666666; /* Lighter text for the body */
    line-height: 1.6; /* Improved readability */
}

footer {
    background-color: #6a1b9a; /* Matching the header's vibrant purple */
    color: #ffffff;
    text-align: center;
    padding: 1em 0;
}

              
            
!

JS

              
                
              
            
!
999px

Console