Skip to content

Hotel Landing Page with Room Photos

Tailwind CSS hotel landing page with a photo hero, booking form with live price total, room cards that prefill the form, and an amenities section.

Also known as: hotel website homepage, hotel booking landing page, boutique hotel website, resort landing page, hotel booking form

Hotel Landing Page with Room Photos live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A complete hotel landing page built with Tailwind CSS and a small vanilla JavaScript file: a full-bleed photo hero with a booking form, three room cards with real photos and nightly prices, an amenities section and a compact footer. It suits boutique hotels, guesthouses, holiday rentals and resort templates that need a direct-booking page.

How it works

The root is .htl-page. The header holds the hero photo as an absolutely positioned img, a gradient overlay (.htl-overlay) that runs top to bottom on phones and left to right from lg, the navigation and a two-column grid with the headline and the #htl-booking form. Below it, #htl-rooms lists three article cards and #htl-amenities pairs a pool photo with six amenities drawn as inline SVG icons.

On DOMContentLoaded the script initializes every .htl-page. It pre-fills the dates (arrival in 14 days, three nights), sets min on both date fields and keeps check-out at least one night after check-in. Each change on [data-htl-checkin], [data-htl-checkout] or [data-htl-room-select] recalculates the stay and writes "3 nights · Garden Room $570" into [data-htl-summary], using the data-price value of the selected option. The Select buttons carry data-htl-pick; clicking one sets the room field, scrolls the form into view and plays the short htl-flash highlight.

The submit handler calls preventDefault(), validates the dates and email, shows "Sending…" for 900 ms and writes a confirmation into [data-htl-status]. Replace that setTimeout with fetch() to your booking endpoint. On phones, [data-htl-menu-toggle] swaps hidden and flex on [data-htl-menu].

Customization

  • data-price on each option in #htl-room: set your nightly rates; the summary total updates automatically.
  • data-htl-pick on the card buttons: must match an option value, so add a fourth room by adding both a card and an option.
  • addDays(today, 14) and addDays(parseIso(checkin.value), 3) in script.js: change the default arrival offset and length of stay.
  • teal-800, teal-950 and amber-300 utilities: swap for another palette, for example sky-800 and rose-300.
  • .htl-serif in style.css: replace the Fraunces font (loaded through externalLibs) with any display face.
  • lg:grid-cols-[1fr_400px] on the hero grid: widen or narrow the booking form column.
  • md:grid-cols-3 on the rooms grid: use lg:grid-cols-3 to keep cards stacked longer on tablets.

The photos come from Unsplash and are only placeholders; replace them with your own hotel images and update the alt text.

Use cases

  • Boutique hotels: a photo hero with a booking form that shows the total for the chosen nights
  • Guesthouses and holiday rentals: room cards with photos and nightly prices fill the booking form
  • Resorts: an amenities section pairs a pool photo with six icons
  • Direct-booking pages: check-in and check-out dates prefill and keep at least one night between them
  • Mobile guests: the navigation collapses into a menu button on small screens

Accessibility

The form is labelled by #htl-form-title, every field has a visible label, the summary uses aria-live="polite", errors are linked to the email field through aria-describedby and aria-invalid, and the result is announced through role="status". The menu button exposes aria-expanded and aria-controls; the Select buttons include the room name for screen readers. All controls have visible focus outlines, the hero overlay keeps white text readable on the photo, and the zoom and highlight animations are disabled under prefers-reduced-motion.

Usage notes

The hero image loads eagerly with fetchpriority="high"; all other photos use loading="lazy". For several copies on one page, change the id values.

Hotel Landing Page with Room Photos at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS, fonts.googleapis.com
Layout
Responsive, works on mobile
Category
Landing Pages
License
Free for personal and commercial use

Questions about this template

Can I use the Hotel Landing Page with Room Photos code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS and fonts.googleapis.com from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  • <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap">

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Hotel Landing Page with Room Photos – Tailwind CSS landing pages component screenshot
Hotel Landing Page with Room Photos · Tailwind CSS Landing Pages

More Landing Pages

Mobile App Landing Page – Bootstrap 5 landing pages preview

Mobile App Landing Page

Bootstrap 5 mobile app landing page with a CSS phone mockup, floating notification cards, store buttons, feature grid, steps and a gradient call to action.

SaaS Landing Page – Tailwind CSS landing pages preview

SaaS Landing Page

Complete Tailwind CSS SaaS landing page with dark hero, feature grid, monthly/yearly pricing switch, FAQ accordion and footer.