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 { /* Demonstration image from Unsplash. Replace with a photo of your hotel or resort. */ --hrh-bg-image: url('https://images.unsplash.com/photo-1566073771259-6a8506099945?q=80&w=1470'); --hrh-min-height: 90vh; --hrh-padding: 3rem 1.5rem; --hrh-text-color: #ffffff; --hrh-overlay-color: rgba(30, 27, 75, 0.7); /* Deep indigo overlay */ --hrh-primary-cta-bg: #fbbf24; --hrh-primary-cta-text: #78350f; --hrh-primary-cta-hover-bg: #f59e0b; --hrh-secondary-cta-border: #facc15; --hrh-max-width: 1100px; } .hotel-resort-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"; min-height: var(--hrh-min-height); padding: var(--hrh-padding); width: 100%; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background-image: var(--hrh-bg-image); background-size: cover; background-position: center; } .hotel-resort-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--hrh-overlay-color); z-index: 1; } .hotel-resort-hero * { box-sizing: border-box; } .hrh-content { position: relative; z-index: 2; max-width: var(--hrh-max-width); color: var(--hrh-text-color); width: 100%; } .hrh-content .title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; line-height: 1.2; margin: 0 0 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); } .hrh-content .subtitle { font-size: 1.15rem; margin: 0 auto 2.5rem; max-width: 600px; opacity: 0.95; } .hrh-content .button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; } .hrh-content .cta-button { display: inline-block; padding: 0.9rem 1.8rem; border-radius: 8px; border: 2px solid transparent; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.3s ease; } .hrh-content .cta-primary { background-color: var(--hrh-primary-cta-bg); color: var(--hrh-primary-cta-text); } .hrh-content .cta-primary:hover { background-color: var(--hrh-primary-cta-hover-bg); } .hrh-content .cta-secondary { border-color: var(--hrh-secondary-cta-border); color: var(--hrh-text-color); } .hrh-content .cta-secondary:hover { background-color: var(--hrh-secondary-cta-border); color: var(--hrh-primary-cta-text); } .amenities-bar { margin-top: 3rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; } .amenities-bar .amenity-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; } .amenities-bar .amenity-item svg { width: 1.25em; height: 1.25em; } </style> <!-- ====================================================================== HTML - Place this in your <body> where you want the component to appear. ====================================================================== --> <section class="hotel-resort-hero"> <div class="hrh-content"> <h1 class="title">Your Exclusive Seaside Retreat</h1> <p class="subtitle">Welcome to The Serene Vista, where exceptional service and breathtaking views create truly lasting memories.</p> <div class="button-group"> <a href="#" role="button" class="cta-button cta-primary">Book Your Stay</a> <a href="#" role="button" class="cta-button cta-secondary">View Photo Gallery</a> </div> <div class="amenities-bar"> <div class="amenity-item"> <svg viewBox="0 0 20 20" fill="currentColor"><path d="M5.5 16a3.5 3.5 0 01-3.5-3.5V6a3.5 3.5 0 013.5-3.5h5a3.5 3.5 0 013.5 3.5v1.25a.75.75 0 01-1.5 0V6a2 2 0 00-2-2h-5a2 2 0 00-2 2v6.5A2 2 0 005.5 14h5a.75.75 0 010 1.5h-5z" /><path d="M20 9.5a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zM10 9.5a3 3 0 106 0 3 3 0 00-6 0z" /></svg> <span>Free High-Speed Wi-Fi</span> </div> <div class="amenity-item"> <svg viewBox="0 0 20 20" fill="currentColor"><path d="M12.25 10a.75.75 0 000-1.5H7.75a.75.75 0 000 1.5h4.5z" /><path fill-rule="evenodd" d="M.808 5.412A.75.75 0 011.5 4.75h17a.75.75 0 01.692.662l1.43 8.25A.75.75 0 0119.25 14.5H.75a.75.75 0 01-.692-.838l1.43-8.25zM1.66 6.25l-1.09 6.25h18.86l-1.09-6.25H1.66z" clip-rule="evenodd" /></svg> <span>Room Service</span> </div> <div class="amenity-item"> <svg viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 1a.75.75 0 01.75.75V3a.75.75 0 01-1.5 0V1.75A.75.75 0 0110 1zm0 2.25a.75.75 0 01.75.75v10.5a.75.75 0 01-1.5 0V4a.75.75 0 01.75-.75zM4 10a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H4.75A.75.75 0 014 10zM10 15a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5A.75.75 0 0110 15z" clip-rule="evenodd" /></svg> <span>Pool & Spa Access</span> </div> </div> </div> </section>