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="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ウェブサイトタイトル</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <div class="header-content">
            <img src="https://nnc-studio.jp/wp-content/themes/nnc-theme/img/common/logo-circle@2x.png" alt="ロゴ" class="logo">
            <nav>
                <ul>
                    <li><a href="#">メニュー1</a></li>
                    <li><a href="#">メニュー2</a></li>
                    <li><a href="#">メニュー3</a></li>
                    <li><a href="#">メニュー4</a></li>
                </ul>
            </nav>
        </div>
        <div class="main-visual">
            <img src="https://nnc-studio.jp/file/sky.jpg" alt="メインビジュアル">
            <h1 class="catchcopy">キャッチコピー</h1>
        </div>
    </header>

    <main>
        <section class="section1">
            <h2>セクション1の見出し</h2>
            <p>ここに600文字程度の説明文を記述します。...</p>
        </section>

        <section class="section2">
            <div class="content-wrapper">
                <div class="image-group">
                    <h2>セクション2の見出し</h2>
                    <img src="https://nnc-studio.jp/file/sky.jpg" alt="セクション2イメージ">
                </div>
                <p>ここに300文字程度の説明文を記述します。...</p>
            </div>
        </section>

        <section class="section3">
            <h2>セクション3の見出し</h2>
            <div class="image-text-group">
                <div class="item">
                    <img src="https://nnc-studio.jp/file/sky.jpg" alt="アイテム1">
                    <p>アイテム1の説明(100文字程度)...</p>
                </div>
                <div class="item">
                    <img src="https://nnc-studio.jp/file/sky.jpg" alt="アイテム2">
                    <p>アイテム2の説明(100文字程度)...</p>
                </div>
                <div class="item">
                    <img src="https://nnc-studio.jp/file/sky.jpg" alt="アイテム3">
                    <p>アイテム3の説明(100文字程度)...</p>
                </div>
                <div class="item">
                    <img src="https://nnc-studio.jp/file/sky.jpg" alt="アイテム4">
                    <p>アイテム4の説明(100文字程度)...</p>
                </div>
            </div>
        </section>
    </main>

    <footer>
        <div class="footer-content">
            <img src="https://nnc-studio.jp/wp-content/themes/nnc-theme/img/common/logo-circle@2x.png" alt="ロゴ" class="logo">
            <div class="contact-info">
                <p>〒123-4567 東京都渋谷区○○町1-2-3</p>
                <p>TEL: 03-1234-5678</p>
            </div>
            <nav>
                <ul>
                    <li><a href="#">メニュー1</a></li>
                    <li><a href="#">メニュー2</a></li>
                    <li><a href="#">メニュー3</a></li>
                    <li><a href="#">メニュー4</a></li>
                </ul>
            </nav>
        </div>
        <p class="copyright">&copy; 2023 ウェブサイト名. All rights reserved.</p>
    </footer>
</body>
</html> 
              
            
!

CSS

              
                * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.header-content, .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo {
    max-width: 100px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1rem;
}

.main-visual {
    position: relative;
}

.main-visual img {
    width: 100%;
    height: auto;
}

.catchcopy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

section {
    padding: 2rem;
    margin-bottom: 2rem;
}

.section1 {
    text-align: center;
}

.section2 .content-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.section2 .image-group {
    flex: 1;
}

.section2 p {
    flex: 1;
}

.section3 .image-text-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.section3 .item {
    flex-basis: calc(25% - 1rem);
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

footer {
    background-color: #f4f4f4;
    padding: 1rem;
}

.copyright {
    text-align: center;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .header-content, .footer-content {
        flex-direction: column;
    }

    nav ul {
        margin-top: 1rem;
    }

    .section2 .content-wrapper {
        flex-direction: column;
    }

    .section3 .item {
        flex-basis: calc(50% - 0.5rem);
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console