Heroes & banners
Centered Hero Section
A simple centered hero with an eyebrow tag, large heading, supporting text and two call to action buttons.
<section class="herocenter-hero">
<span class="herocenter-eyebrow">Learn to code for free</span>
<h1 class="herocenter-title">Build your first website from scratch</h1>
<p class="herocenter-subtitle">Gwecode teaches HTML, CSS and JavaScript through short lessons and real projects, no experience required.</p>
<div class="herocenter-actions">
<button class="herocenter-primary">Start Learning</button>
<button class="herocenter-secondary">View Lessons</button>
</div>
</section>
.herocenter-hero {
box-sizing: border-box;
width: 100%;
max-width: 720px;
margin: 0 auto;
text-align: center;
padding: 60px 20px;
background-color: #ffffff;
font-family: system-ui, -apple-system, sans-serif;
}
.herocenter-eyebrow {
display: inline-block;
background-color: #eff6ff;
color: #3b82f6;
font-size: 12px;
font-weight: 700;
padding: 6px 14px;
border-radius: 999px;
margin-bottom: 18px;
}
.herocenter-title {
margin: 0 0 16px;
font-size: 40px;
font-weight: 800;
line-height: 1.15;
color: #111827;
}
.herocenter-subtitle {
max-width: 480px;
margin: 0 auto 30px;
font-size: 16px;
line-height: 1.6;
color: #6b7280;
}
.herocenter-actions {
display: flex;
justify-content: center;
gap: 14px;
}
.herocenter-primary {
background-color: #3b82f6;
color: #ffffff;
border: none;
padding: 13px 26px;
border-radius: 8px;
font-size: 15px;
font-weight: 700;
cursor: pointer;
transition: transform 0.2s ease, background-color 0.2s ease;
}
.herocenter-primary:hover {
background-color: #2f6fe0;
transform: translateY(-2px);
}
.herocenter-secondary {
background-color: transparent;
color: #374151;
border: 1.5px solid #d1d5db;
padding: 13px 26px;
border-radius: 8px;
font-size: 15px;
font-weight: 700;
cursor: pointer;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.herocenter-secondary:hover {
background-color: #f3f4f6;
border-color: #9ca3af;
}