Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- ====================================================================== CSS - Place this in your <head> or in an external stylesheet. ====================================================================== --> <style> :root { --shh-padding: 3rem 1.5rem; --shh-bg-color: #111827; --shh-text-color: #d1d5db; --shh-headline-color: #ffffff; --shh-accent-color: #818cf8; --shh-cta-bg: #818cf8; --shh-cta-text-color: #1e1b4b; --shh-cta-hover-bg: #a78bfa; --shh-max-width: 1100px; } .speaker-highlight-hero { box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; background-color: var(--shh-bg-color); padding: var(--shh-padding); width: 100%; display: flex; justify-content: center; align-items: center; } .speaker-highlight-hero * { box-sizing: border-box; } .speaker-hero-container { display: flex; flex-direction: column-reverse; gap: 2rem; max-width: var(--shh-max-width); width: 100%; align-items: center; } .speaker-hero-content { text-align: center; color: var(--shh-text-color); } .speaker-hero-content .keynote { font-size: 1rem; font-weight: 600; text-transform: uppercase; color: var(--shh-accent-color); margin: 0; } .speaker-hero-content .name { font-size: clamp(2.5rem, 6vw, 3.5rem); color: var(--shh-headline-color); font-weight: 800; line-height: 1.1; margin: 0.5rem 0; } .speaker-hero-content .title { font-size: 1.1rem; line-height: 1.6; margin: 0 0 2rem 0; max-width: 500px; margin-left: auto; margin-right: auto; } .speaker-hero-content .cta { display: inline-block; background-color: var(--shh-cta-bg); color: var(--shh-cta-text-color); padding: 0.9rem 2rem; font-size: 1.05rem; font-weight: 700; border: none; border-radius: 8px; text-decoration: none; cursor: pointer; transition: background-color 0.3s ease; } .speaker-hero-content .cta:hover { background-color: var(--shh-cta-hover-bg); } .speaker-hero-image-wrapper { flex-shrink: 0; } .speaker-hero-image-wrapper .image { width: 250px; height: 250px; border-radius: 50%; object-fit: cover; border: 4px solid var(--shh-accent-color); box-shadow: 0 0 25px rgba(129, 140, 248, 0.4); } @media (min-width: 768px) { .speaker-highlight-hero { padding: 5rem 1.5rem; } .speaker-hero-container { flex-direction: row; gap: 4rem; } .speaker-hero-content { text-align: left; } .speaker-hero-content .title, .speaker-hero-content .cta { margin-left: 0; margin-right: 0; } .speaker-hero-image-wrapper .image { width: 300px; height: 300px; } } </style> <!-- ====================================================================== HTML - Place this in your <body> where you want the component to appear. ====================================================================== --> <section class="speaker-highlight-hero"> <div class="speaker-hero-container"> <figure class="speaker-hero-image-wrapper"> <!-- Image by Unsplash user 'houcinencib photography' Replace with your speaker's photo. --> <img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=800" alt="A professional headshot of Dr. Anya Sharma." class="image"> </figure> <div class="speaker-hero-content"> <p class="keynote">Keynote Speaker</p> <h1 class="name">Dr. Anya Sharma</h1> <p class="title">Lead AI Ethicist at SynthCore & Author of "The Algorithmic Conscience"</p> <a href="#" role="button" class="cta">View Session Details</a> </div> </div> </section>