Preview:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Stylish Page</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <header class="header">
        <h1>Welcome to My Stylish Page</h1>
        <p>Experience CSS Grid, Flexbox, and Animations!</p>
    </header>

    <main class="container">
        <section class="content">
            <div class="card">Card 1</div>
            <div class="card">Card 2</div>
            <div class="card">Card 3</div>
            <div class="card">Card 4</div>
        </section>
        <aside class="sidebar">
            <h2>Sidebar</h2>
            <p>This is the sidebar content.</p>
        </aside>
    </main>

    <footer class="footer">
        <p>&copy; 2024 My Stylish Page</p>
    </footer>
</body>
</html>



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

body {
    font-family: Arial, sans-serif;
    color: #333;
}

.container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    padding: 20px;
}

.header, .footer {
    text-align: center;
    background-color: #333;
    color: #fff;
    padding: 20px;
}

.content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    flex: 1 1 calc(50% - 20px);
    background: #4CAF50;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.05);
    background: #45a049;
}

.sidebar {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.header h1, .content .card {
    animation: fadeIn 1s ease-in-out;
}

.content .card {
    animation-delay: 0.5s;
    animation-fill-mode: backwards;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter