To create a restaurant menu page using Bootstrap, you can use various Bootstrap components such as cards, grids, and typography to display the menu items in a visually appealing manner. Here's an example of how to create a restaurant menu page using Bootstrap 4:
<!DOCTYPE html>
<html>
<head>
<title>Restaurant Menu Example</title>
<!-- Include Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h1>Our Menu</h1>
<div class="row mt-4">
<!-- Menu Item 1 -->
<div class="col-md-4">
<div class="card">
<img src="menu-item-1.jpg" class="card-img-top" alt="Menu Item 1">
<div class="card-body">
<h5 class="card-title">Menu Item 1</h5>
<p class="card-text">Description of Menu Item 1.</p>
<p class="card-text">Price: $10</p>
</div>
</div>
</div>
<!-- Menu Item 2 -->
<div class="col-md-4">
<div class="card">
<img src="menu-item-2.jpg" class="card-img-top" alt="Menu Item 2">
<div class="card-body">
<h5 class="card-title">Menu Item 2</h5>
<p class="card-text">Description of Menu Item 2.</p>
<p class="card-text">Price: $12</p>
</div>
</div>
</div>
<!-- Menu Item 3 -->
<div class="col-md-4">
<div class="card">
<img src="menu-item-3.jpg" class="card-img-top" alt="Menu Item 3">
<div class="card-body">
<h5 class="card-title">Menu Item 3</h5>
<p class="card-text">Description of Menu Item 3.</p>
<p class="card-text">Price: $8</p>
</div>
</div>
</div>
</div>
</div>
<!-- Include Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>
In the example above, we start by including the necessary Bootstrap CSS and JS files. Make sure to include them in the head section of your HTML document.
Inside the container, we have a heading element and a row with three columns. Each column represents a menu item.
For each menu item, we use the card component in Bootstrap. The card contains an image, card body, and various text elements such as card title and card text.
The `col-md-4` class applied to each column ensures that the columns stack vertically on smaller screens, allowing for a responsive layout.
You can replace the placeholder image URLs (`menu-item-1.jpg`, `menu-item-2.jpg`, `menu-item-3.jpg`) with the actual image URLs for your menu items. Update the text content within the card elements to reflect your menu item names, descriptions, and prices.
Save the HTML file and include your menu item images. Open the file in a web browser to see the restaurant menu page.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc