Hotel/Accommodation Card
Display hotel, rental, or accommodation listings in an attractive and information-rich format with this specialized card.
This component is designed for travel and booking websites. It effectively balances a large hero image with vital booking information, including rating, location, key amenities, and nightly price.

About this Component
The hotel card is designed to provide users with all the main information they need to make a booking decision without feeling overwhelmed. It uses a clear visual hierarchy, grouping related information together. An interactive "wishlist" button is included for users who want to save a property for later consideration.
Features
- Information-Dense Layout: The design efficiently presents a star rating, location, name, amenities, and price in a clean, multi-section format.
- Interactive Wishlist Button: An icon button is overlaid on the main image, providing an intuitive way for users to "favorite" a listing.
- Clear Call-to-Action: The footer combines a bold price display with a prominent "View Deal" button to drive user engagement.
- Flexible Layout: The main content area uses Flexbox to ensure the price and CTA footer is always aligned neatly at the bottom of the card.
Code Breakdown
HTML Structure
The card is built as an article
. The top half is the image container, which holds both the main image and the wishlist button
. The bottom half, the div
with class .hotel-card-content
, is a flex container for the textual details. Inside, the content is semantically structured with a header
for the rating and location, a link-wrapped h3
for the hotel name, and a footer
for the price and CTA button.
CSS Styling
The overall card is a flex container with flex-direction: column
. Inside the content section, margin-top: auto
is applied to the footer. This pushes the footer to the bottom of the available space, ensuring the price and "View Deal" button are always aligned horizontally across all cards in a grid, regardless of the amount of content above them. The wishlist button is positioned over the image using position: absolute
, with its parent container set to position: relative
.
Code
Here's the complete, self-contained code. It's ready to be populated with your property listings.