How to Create a Restaurant Website Using HTML and CSS

Preview Link
Quick Info
Youtube : https://youtu.be/jwhz5PnlRLg
Views : 797
Skills : html,css
Category : Web Design
Tag : Restaurant Website,Food Website

In this tutorial, we are learning how To create responsive restaurant website using HTML and CSS with source code. In this website we are not going to use javascript or jquery. This website is going to be pure HTML and CSS.

Section we are going to design in responsive restaurant website using HTML and CSS

In our website, we are going to design three main section : Header section, Main Body And Footer section

In this tutorial we are going to design these three section with the help of their subsections. Subsections are created as per the website content.

Header

  • Logo
  • Main menu
  • Book Table Button

Main Body

  • Slider section
  • Banner Section
  • Food Menu Section
  • Advertisement

Footer

  • About Us
  • Quick link
  • Opening Timing
  • Contact information

Video Tutorial

You can also watch video of creating How To Design responsive restaurant Website Using HTML And CSS to understand easily. You can watch the complete video tutorial below.

Let's Start The Coding

Firstly, create the folder on desktop, my folder name is : restaurant-website Inside restaurant-website folder, create two sub folder : - 1) css and 2) images

Inside the CSS folder, we will save the css file, which we will use on this website.

Inside the images folder, we will save all images which we will use on this website.

Inside restaurant-website folder, I am creating one HTML file file name - index.html

Inside css folder, I am creating one CSS file - file name - style.css

Let's start design with writing basic HTML 5 code in index.html, and link style.css file to index.html file

Meta html code. Copy And paste the code in index.html

index.html
<!----------META HTML STARTS----->
<!DOCTYPE html>
<html>
<head>
<title>Restaurant Website Using HTML And CSS</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!----------META HTML ENDS----->

Common CSS code. Copy And paste the below code in style.css

style.css
* {
	font-family Roboto, sans-serif, arial;
	box-sizing:border-box;
	margin:0px;
	padding:0px;
}
a {
	text-decoration:none;
}
:target {
	display:block!important;
}
.container {
	width:100%;
	max-width:1200px;
	margin: 0 auto;
	padding:0px 10px;
}

2) Now, we will design Header of restaurant website HTML code free.

In our top header section, we are logo on left side, nav bar in center and book table button on right side.

For creating logo, we are using img tag, for designing nav bar we are using ul>li tag, and to design book table button we are using anchor tag.

For responsive restaurant website HTML code free please copy and paste the below code to design header section.

Header section HTML code. Copy this code and paste in index.html file

index.html
<!----------HEADER HTML STARTS----->
<header>
  <div class="container">
    <div class="header">
      <div class="logo"><img src="images/logo.png"></div>
      <div class="menu">
        <div id="menu">
          <div class="menu-inner"> <a href="#" class="closeicon"></a>
            <ul>
              <li>Home</li>
              <li>About Us</li>
              <li>Category</li>
              <li>Menu</li>
              <li>Blog</li>
              <li>Contact Us</li>
            </ul>
          </div>
        </div>
      </div>
      <div class="book">
        <ul>
          <li><a href="#">Book Table</a></li>
          <li><a href="#menu" class="menuicon"></a></li>
        </ul>
      </div>
    </div>
  </div>
</header>
<!----------HEADER HTML ENDS----->

Header section CSS code . Copy the code and paste in style.css

style.css
/**********START HEADER SECTION**********/
header {
	display: flex;
	position: relative;
	background:#ffcb01;
}
.header {
	margin:5px 0px;
	display:flex;
}
.logo {
	max-width:30%;
	min-width:150px;
}
.menu {
	margin:0px auto;
	text-align:center;
}
.menu ul {
	display: flex;
	list-style: none;
	gap: 20px;
	margin:12px 0px 0px 0px;
}
.menu li {
	color:brown;
	font-weight:600;
}
.book ul {
	display: flex;
	list-style: none;
	gap: 20px;
	margin-top:10px;
}
.book a {
	font-size: 14px;
	border: none;
	padding: 8px 15px;
	border-radius: 5px;
	color: #fff;
	background:red;
}
.menuicon {
	display:none;
}
.closeicon {
	display:none;
	float:right;
	font-size: 28px;
	color: black;
}

/*For Mobile And Ipad Version*/

@media screen and (max-width: 768px) {

.menuicon, .closeicon {
 display:unset;
}
#menu {
	 position: fixed;
	 left: 0px;
	 background: #00000094;
	 width: 100%;
	 height: 100%;
	 top: 0px;
	 text-align: left;
	 display: none;
}
.menu-inner {
	 background: #fff5ce;
	 height: 100%;
	 top: 0px;
	 left: 0px;
	 width: 70%;
	 position: absolute;
	 padding: 20px;
	 border-right: 2px solid red;
}
#menu ul {
	 display: block;
	 margin-top: 45px;
}
#menu ul li {
	 margin-bottom:30px;
}

}
/**********END HEADER SECTION**********/

Output Of Top Header

header section of restaurant website using html and css

3) Now, we will design slider section.

In our slider section, we are having full width image. For designing slider section we are using img>src tag to show image in html.

Please copy and paste the below code to design slider section

Slider section HTML code. Copy this code and paste in index.html

index.html
<!----------SLIDER HTML STARTS----->
<div class="w-100">
	<img src="images/slider.jpg" class="slider">
</div>
<!----------SLIDER HTML ENDS----->

Slider section CSS code. Copy this code and paste in style.css file

style.css
/**********START SLIDER SECTION**********/
.w-100 {
	width:100%;
}
.slider {
    object-fit: cover;
    width: 100%;
    height:700px;
}

@media screen and (max-width: 768px) {

.slider {
    height:400px;
}	

}

@media screen and (max-width: 480px) {

.slider {
    height:220px;
}
	
}
/**********END SLIDER SECTION**********/

Output Of Slider

slider section of restaurant website using html and css

4) Now, we will design banner section.

In our Banner section, we are having two images. For designing banner section we are using img>src tag to show image in html.

Please copy and paste the below code to design banner section

Banner section HTML code. Copy this code and paste in index.html file

index.html
<!----------BANNER HTML STARTS----->
<div class="container">
  <div class="banner">
  	<img src="images/banner-1.jpg" class="w-100">
    <img src="images/banner-2.jpg" class="w-100">
  </div>
</div>
<!----------BANNER HTML ENDS----->

Banner section CSS code. Copy this code and paste in style.css file

style.css
/**********START BANNER SECTION**********/
.banner {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	display: grid;
	gap: 10px;
	margin:30px 0px;
}
/**********END BANNER SECTION**********/

Output Of Banner

banner section of restaurant website using html and css

5) Now, we will design food menu listing section.

In our top header section, we are having product image, product name, sales price and order now button.

For showing product image, we are using img>src tag and h2 tag for showing product name.

Please copy and paste the below code to design food menu listing section

Food Menu Listing section HTML code. Copy this code and paste in index.html file

index.html
<!----------PRODUCT HTML STARTS----->
<div class="container">
  <h2 class="heading">Most Ordered <span>Food Menu</span></h2>
  <p class="subhead">Top Picks from Our Customers..</p>
  
  <div class="products">
        <div class="pro"> <img src="images/p-1.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-2.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-3.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-4.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-5.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-6.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-7.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-8.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-9.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-10.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-11.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
        <div class="pro"> <img src="images/p-12.jpg" class="w-100">
      <h6>Product Name Here</h6>
      <p><b>$19.99</b> <strike>$10.99</strike> </p>
      <a href="#">Order Now</a> </div>
      </div>
  
</div>
<!----------PRODUCT HTML ENDS----->

Food Menu Listing section CSS code. Copy this code and paste in style.css file

style.css
/**********START PRODUCT SECTION**********/
.heading {
    text-align: center;
    font-size:32px;
    padding: 0px;
    margin: 80px 0px 0px 0px;
}
.heading span {
    color: #F9A825;
}
.subhead {
    text-align: center;
    font-size: 18px;
    padding: 0px;
    margin: 5px 0px 40px 0px;
}
.products {
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	display: grid;
	gap: 15px;
	margin:0px 0px 80px 0px;
}
.pro {
    border: 1px solid #fc9800;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 0px 5px 20px 5px;
	text-align:center
}
.pro h6 {
    font-size: 20px;
    margin: 20px 0px 5px 0px;
}
.pro b {
    font-size: 26px;
    margin-right: 5px;
    color: red;
}
.pro strike {
    font-size:16px;
}
.pro a {
    text-align: center;
    background: #fc9800;
    color: white;
    padding: 10px 12px;
    border-radius: 25px;
    font-size: 16px;
	width:200px;
	margin:0px auto;
    margin-top: 20px;
}
/**********END PRODUCT SECTION**********/

Output Of Food Menu Listing

food menu listing section of restaurant website using html and css

6) Now, we will design advertisement section.

In our advertisement section, we are having ads section on left side and ads dummy content on right side. For designing ads section we are using img>src tag to show ads image in html.

Please copy and paste the below code to design advertisement section

Adversitement section HTML code. Copy this code and paste in index.html file

index.html
<!----------ADVERSITEMENT HTML STARTS----->
<div class="w-100 ads-section">
  <div class="container">
    <div class="ads">
      
      <img src="images/scooter.png" class="w-100">
      
      <div> 
        <i>On Call Delivery</i>
        <h2><span>Hot Delicious </span> <br> Pizza</h2>
        <h3>Top Italian pizza at your home</h3>
        <p>Home Delivery Only In <span>20 Mintue</span></p>
        <a href="#">Call Now</a> </div>
    </div>
    
  </div>
</div>
<!----------ADVERSITEMENT HTML ENDS----->

Adversitement section CSS code. Copy this code and paste in style.css file

style.css
/**********START ADVERSITEMENT SECTION**********/
.ads-section {
    background: #fffbf4; 
	padding:20px 0px;
}
.ads {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	display: grid;
	gap: 50px;
	margin:20px 0px;
}
.ads div{
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}
.ads i {
    padding-top: 50px;
    color: red;
}
.ads h2 {
  font-size:60px;
}
.ads span {
     color: red;
}
.ads h3 {
    font-size:24px;
    padding: 10px 0px 10px 0px;
	font-weight:500
}
.ads p {
    font-size: 18px;
	padding-top:5px;
}
.ads a{
    margin-top: 20px;
    background: red;
    padding: 12px 30px;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    max-width: fit-content;
}
/**********END ADVERSITEMENT SECTION**********/

Output Of Advertisement

advertisement section of restaurant website using html and css

6) Now, we will design footer section.

In our footer section, we are having about us, quick link, opening timing, contact information.

Please copy and paste the below code to design footer section

Footer section HTML code. Copy this code and paste in index.html

index.html
<!----------FOOTER HTML STARTS----->
<footer>
  <div class="container">
    <div class="foot">
      <div class="col-foot">
        <h2>About Us</h2>
        <p>If you are going to use of Lorem Ipsum need to be sure there isn't hidden of text. If you are going to use of Lorem Ipsum need to be sure there isn't hidden of text. </p>
      </div>
      <div class="col-foot">
        <h2>Quick Links</h2>
        <ul>
          <li>Home</li>
          <li>Cart</li>
          <li>About Us</li>
          <li>Menu</li>
          <li>Category </li>
          <li>Blog</li>
          <li>Show Now</li>
          <li>Contact Us</li>
        </ul>
      </div>
      <div class="col-foot">
        <h2>Opening Timing</h2>
        <table>
          <tr>
            <td>Mon-Fri.....</td>
            <td>10:00 AM - 10:00 PM</td>
          </tr>
          <tr>
            <td>Saturday...</td>
            <td>10:00 AM - 06:00 PM</td>
          </tr>
          <tr>
            <td>Sunday......</td>
            <td>Closed</td>
          </tr>
        </table>
      </div>
      <div class="col-foot">
        <h2>Contact Us</h2>
        <ul class="contactus">
          <li>3A-25 Ring road North-east, <br>
            Delhi, India, 462001</li>
          <li>info@restaurant.com</li>
          <li>+0 123 456 7890</li>
        </ul>
      </div>
    </div>
  </div>
</footer>
<!----------FOOTER HTML ENDS----->
</body>
</html>

Footer CSS code. Copy And paste the below code in style.css

style.css
/**********START FOOTER SECTION**********/
footer {
    border-top: 3px solid red;
    background: #fff5ce;
    padding: 40px 0px;
}
.foot {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	display: grid;
	gap: 10px;
	padding:30px 0px 50px 0px;
	margin:0px auto;
}
footer h2 {
	font-size:20px;
	margin-bottom:25px;
}
footer p{
	text-align:justify;
	padding-right:60px;
	line-height:28px;
}
footer ul{
	padding-left:10px;
}
footer table td{
	padding:10px 0px; 
}
footer li {
	margin-bottom:15px;
	line-height:26px;
	list-style-type: disclosure-closed;
	width:46%;
	float:left;
	margin-left:2%;
}
.contactus li{
	width:90%;
}
/**********END FOOTER SECTION**********/

Output Of Footer

footer section of restaurant website using html and css

Introduction : HTML code for creating a web page for restaurant

A well-designed website is crucial for any restaurant to establish a strong online presence. It serves as a digital storefront, helping potential customers explore the menu, location, ambiance, and special offers before visiting. By using HTML and CSS, you can create a visually appealing and functional restaurant website that enhances user experience and attracts more customers.

When developing a restaurant website project in HTML, it is essential to have a well-organized structure. The HTML code for creating a web page for a restaurant typically includes a navigation bar, a hero section, a menu, and a contact section. Using clean and semantic HTML code improves accessibility and search engine rankings. Combining HTML with CSS ensures a visually appealing and responsive design that enhances the user experience.

Restaurant Website Project Source Code

This article will guide you through a restaurant website project in HTML and its essential elements. If you are working on a restaurant website project using HTML and CSS, having access to the restaurant website project source code can be beneficial. A well-structured source code ensures an efficient and clean design, making the website easier to maintain and update. Many open-source platforms provide templates that can be customized according to specific restaurant needs.

Conclusion

A restaurant website project using HTML and CSS plays a crucial role in marketing and customer engagement. By focusing on aesthetics, functionality, and user experience, restaurants can create a digital presence that drives traffic, enhances credibility, and ultimately increases business success. A well-structured restaurant website project in HTML acts as a powerful tool to attract and retain customers in a competitive food industry.

A restaurant website designed with HTML and CSS plays a crucial role in marketing and customer engagement. By focusing on aesthetics, functionality, and user experience, restaurants can create a digital presence that drives traffic, enhances credibility, and ultimately increases business success. A well-structured website acts as a powerful tool to attract and retain customers in a competitive food industry. A well-structured restaurant website project in HTML acts as a powerful tool to attract and retain customers in a competitive food industry.

Post your comment
For any query, information or suggestion, post your comment below. We love to hear from your.
  • Best tutorial on e commerce website html and css code. Very good

  • great article to understand how to create website for food business

  • great to have restaurant website using html css and javascript with source code

  • very easy to understand restaurant website html code free download nice work.

  • great to have restaurant website html code free download :) :) . You help me a lot

  • Thank you so much for providing html code for creating a web page for restaurant website using html and css

Click Here To View This Tutorial On Youtube Subscribe Us On Youtube