Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025

    How to create Valentine’s Love Button Animation using HTML CSS and JS

    23 June 2025

    How to create Magic Indicator Menu using HTML CSS and JS

    20 June 2025
    Facebook X (Twitter) Instagram YouTube Telegram Threads
    Coding StellaCoding Stella
    • Home
    • Blog
    • HTML & CSS
      • Login Form
    • JavaScript
    • Hire us!
    Coding StellaCoding Stella
    Home - HTML & CSS - How to make KFC Landing Page using HTML & CSS
    HTML & CSS

    How to make KFC Landing Page using HTML & CSS

    Coding StellaBy Coding Stella12 January 2024Updated:13 January 2024No Comments6 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Email WhatsApp Copy Link

    Hello everyone! Today, let’s embark on a creative journey and build a simple KFC Landing Page using HTML and CSS. Whether you’re a coding enthusiast or just starting out, this tutorial offers a great opportunity to refine your skills and create a visually appealing landing page for a popular brand like KFC.

    We’ll be using HTML for structuring our page and CSS to add some style. No need for complicated setups – just a straightforward approach to bring the essence of KFC to your web project.

    Join me in this coding adventure as we explore the world of web design. Let’s keep it simple and enjoyable with HTML and CSS. Ready to create a tasty KFC-inspired landing page? Let’s get started!

    HTML :

    The given HTML code represents a responsive landing page for KFC. It includes a header with a logo and navigation menu, a main content section with a text description and a slider displaying different food images, and a footer with social media links and navigation buttons. The JavaScript code handles the toggle functionality for the navigation menu and implements a slider for the images.

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>KFC Landing Page | Responsive Design</title>
      <link rel="stylesheet" href="style.css">
    </head>
    <body>
      <section class="main">
        <header>
          <a href="#"><img src="logo.png" class="logo"></a>
          <div class="toggle"></div>
          <ul class="navigation">
            <li><a href="#">Home</a></li>
            <li><a href="#">Menu</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Contact</a></li>
          </ul>
        </header>
        <div class="content">
          <div class="text">
            <h2>Its Finger<br>Lickin <span>Good.</span></h2>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae, adipisci obcaecati! Accusamus fugiat obcaecati nesciunt maiores rerum placeat amet voluptatibus cumque soluta similique saepe, assumenda eos dolorum autem. Iusto enim accusamus optio cupiditate earum ipsam!</p>
            <a href="#" class="btn">Order Now</a>
          </div>
          <div class="slider">
            <div class="slides active">
              <img src="burger_fries.png">
            </div>
            <div class="slides">
              <img src="french_fries.png">
            </div>
            <div class="slides">
              <img src="burger.png">
            </div>
            <div class="slides">
              <img src="fried_chicken.png">
            </div>
          </div>
        </div>
    
        <div class="footer">
          <ul class="sci">
            <li><a href="#"><ion-icon name="logo-facebook"></ion-icon></a></li>
            <li><a href="#"><ion-icon name="logo-twitter"></ion-icon></a></li>
            <li><a href="#"><ion-icon name="logo-instagram"></ion-icon></a></li>
          </ul>
          <div class="prevNext">
            <p>Always Fresh</p>
            <span class="prev"><ion-icon name="chevron-back-outline"></ion-icon></span>
            <span class="next"><ion-icon name="chevron-forward-outline"></ion-icon></span>
          </div>
        </div>
      </section>
      <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
      <script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
    
      <script>
        //toggle 
        const menutoggle = document.querySelector('.toggle');
        const navigation = document.querySelector('.navigation');
        menutoggle.onclick = function(){
          menutoggle.classList.toggle('active')
          navigation.classList.toggle('active')
        }
    
        //slider
        const slides = document.querySelectorAll('.slides');
        const prev = document.querySelector('.prev');
        const next = document.querySelector('.next');
    
        i = 0;
        
        function ActiveSlide(n){
          for(slide of slides)
          slide.classList.remove('active');
          slides[n].classList.add('active');
        }
    
        // function for next btn
        next.addEventListener('click', function(){
          if(i == slides.length - 1){
            i = 0;
            ActiveSlide(i);
          }
          else 
          {
            i++;
            ActiveSlide(i);
          }
        })
    
         // function for prev btn
         prev.addEventListener('click', function(){
          if(i == 0){
            i = slides.length - 1;
            ActiveSlide(i);
          }
          else 
          {
            i--;
            ActiveSlide(i);
          }
        })
      </script>
    </body>
    </html>

    CSS :

    The given code is a CSS stylesheet that defines the styling for a webpage. It includes various selectors and properties to control the layout, colors, fonts, and responsiveness of the webpage. The code uses the Ubuntu font from Google Fonts and sets a radial gradient background. It also includes media queries to adjust the layout for different screen sizes.

    @import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');
    *
    {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Ubuntu', sans-serif;
    }
    .main
    {
      position: relative;
      min-height: 100vh;
      background: radial-gradient(#f0483a,#d10a20);
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      padding: 30px 100px;
    }
    header
    {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      padding: 30px 100px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 1000;
    }
    .logo
    {
      max-width: 90px;
    }
    .navigation
    {
      display: flex;
    }
    .navigation li 
    {
      list-style: none;
    }
    .navigation li a 
    {
      position: relative;
      color: #fff;
      text-decoration: none;
      margin-left: 40px;
    }
    .content
    {
      position: relative;
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .content .text
    {
      width: 100%;
      max-width: 600px;
    }
    .content .text h2
    {
      color: #fff;
      font-size: 5em;
      font-weight: 300;
    }
    .content .text h2 span
    {
      font-weight: 700;
    }
    .content .text p 
    {
      color: #fff;
      font-weight: 400;
      font-size: 1.1em;
      line-height: 1.5em;
      margin: 20px 0;
    }
    .btn
    {
      position: relative;
      display: inline-block;
      padding: 20px 50px;
      background: #fff;
      color: #333;
      font-size: 1.1em;
      font-weight: 500;
      border-radius: 40px;
      text-decoration: none;
      transition: 0.25s;
    }
    .btn:hover 
    {
      letter-spacing: 2px;
    }
    .slider
    {
      position: relative;
    }
    .slider .slides 
    {
      display: none;
    }
    .slider .slides.active
    {
      display: block;
    }
    .slider .slides img 
    {
      width: 100%;
      max-width: 600px;
    }
    .footer
    {
      position: absolute;
      bottom: 0;
      width: 100%;
      display: flex;
      padding: 30px 100px;
      justify-content: space-between;
      align-items: flex-end;
    }
    .sci 
    {
      display: flex;
    }
    .sci li
    {
      list-style: none;
    }
    .sci li a 
    {
      color: #fff;
      font-size: 2em;
      margin-right: 20px;
      display: inline-block;
      transition: 0.25s;
    }
    .sci li a:hover 
    {
      transform: translateY(-5px);
    }
    .prevNext 
    {
      position: relative;
      user-select: none;
    }
    .prevNext p 
    {
      position: relative;
      color: #fff;
      text-align: end;
      margin-bottom: 15px;
    }
    .prevNext p::before 
    {
      content: '';
      position: absolute;
      top: 50%;
      left: -35px;
      transform: translateY(-50%);
      width: 50px;
      height: 2px;
      background: #fff;
    }
    .prevNext span
    {
      position: relative;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      width: 50px;
      height: 50px;
      border: 2px solid #fff;
      cursor: pointer;
      font-size: 2em;
      color: #fff;
    }
    .prevNext span:nth-child(2)
    {
      margin-right: 20px;
    }
    
    /* now, make it responsive */
    @media (max-width:991px)
    {
      .main
      {
        padding: 40px;
      }
      header
      {
        padding: 20px 40px;
      }
      .logo
      {
        max-width: 70px;
      }
      .content
      {
        flex-direction: column;
        margin: 120px 0 40px;
      }
      .content .text
      {
        max-width: 100%;
      }
      .content .text h2
      {
        font-size: 4em;
      }
      .slider
      {
        margin-top: 40px;
      }
      .slider .slides img
      {
        width: 100%;
        max-width: 420px;
      }
      .footer
      {
        position: relative;
        padding: 0;
      }
    
      .navigation
      {
        display: none;
      }
      .navigation.active
      {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #d10a20;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
      }
      .navigation li a
      {
        font-size: 1.5em;
        margin: 10px 0;
        display: inline-block;
      }
      .toggle
      {
        position: relative;
        width: 32px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 100000;
        cursor: pointer;
      }
      .toggle.active 
      {
        position: fixed;
        right: 40px;
      }
      .toggle::before
      {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: #fff;
        transform: translateY(-10px);
        box-shadow: 0 10px 0 #fff;
        transition: 0.25s;
      }
      .toggle.active::before
      {
        transform: translateY(0px) rotate(45deg);
        box-shadow: 0 0 0 #fff;
      }
      .toggle::after
      {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: #fff;
        transform: translateY(10px);
        transition: 0.25s;
      }
      .toggle.active::after
      {
        transform: translateY(0px) rotate(-45deg);
      }
    }
    
    @media (max-width:480px)
    {
      header,
      .main
      {
        padding: 20px;
      }
      .toggle.active 
      {
        right: 20px;
      }
      .content .text h2
      {
        font-size: 3em;
      }
      .btn 
      {
        padding: 15px 30px;
      }
      .footer
      {
        flex-direction: column-reverse;
        align-items: center;
      }
      .sci
      {
        margin-top: 40px;
      }
    }

    Fantastic job, everyone! We’ve successfully built our KFC Landing Page using HTML and CSS. Whether you’re a coding pro or just starting out, you now have a delicious project under your belt. Keep coding, stay curious, and enjoy the satisfaction of creating something awesome. Well done!

    If your project hits a snag, no worries! Access the source code effortlessly. Click the Download button to kickstart your coding expedition. May your coding be filled with joy!

    Landing page
    Share. Copy Link Twitter Facebook LinkedIn Email WhatsApp
    Previous ArticleHow to make Coca-Cola Product card using HTML & CSS
    Next Article How to make Currency Converter using HTML CSS & JavaScript
    Coding Stella
    • Website

    Related Posts

    HTML & CSS

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025
    HTML & CSS

    How to create Awesome Cool Loading Animation using HTML CSS and JS

    16 June 2025
    HTML & CSS

    How to Create Animated Bicycle Product Card using HTML & CSS

    1 June 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Trending Post

    Master Frontend in 100 Days Ebook

    2 March 202419K Views

    How to make Modern Login Form using HTML & CSS | Glassmorphism

    11 January 202417K Views

    How to make I love you Animation in HTML CSS & JavaScript

    14 February 202416K Views

    How to make Valentine’s Day Card using HTML & CSS

    13 February 202412K Views
    Follow Us
    • Instagram
    • Facebook
    • YouTube
    • Twitter
    ads
    Featured Post

    How to make Social media icons hover effect using HTML & CSS

    14 May 2025

    How to make QR Code Generator using HTML CSS & JavaScript

    14 January 2024

    How to create Login and Signup Form using HTML CSS and JS

    9 June 2025

    50 Projects in 50 Days – HTML/CSS and JavaScript

    23 February 2025
    Latest Post

    How to create Social media popup hover menu using HTML and CSS

    25 June 2025

    How to create Valentine’s Love Button Animation using HTML CSS and JS

    23 June 2025

    How to create Magic Indicator Menu using HTML CSS and JS

    20 June 2025

    How to create Awesome Cool Loading Animation using HTML CSS and JS

    16 June 2025
    Facebook X (Twitter) Instagram YouTube
    • About Us
    • Privacy Policy
    • Return and Refund Policy
    • Terms and Conditions
    • Contact Us
    • Buy me a coffee
    © 2025 Coding Stella. Made with 💙 by @coding.stella

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Looks like you're using an ad blocker. We rely on advertising to help fund our site.
    Okay! I understood