Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • jQuery
  • AngularJS
  • ReactJS
  • Next.js
  • React Native
  • NodeJS
  • Express.js
  • MongoDB
  • MERN Stack
  • PHP
  • WordPress
  • Bootstrap
  • Tailwind
  • CSS Frameworks
  • JS Frameworks
  • Web Development
Open In App
Next Article:
Create a Product Detail Page Template using HTML and CSS
Next article icon

Design a Cookies Message Popup Template using HTML and CSS

Last Updated : 29 Dec, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article, we will design a Cookies Message Popup template using HTML and CSS. Cookies play a pivotal role in enhancing user experiences on websites by storing information about user preferences and interactions. The "Cookies Message Popup Template" is a simple and customizable solution for websites to inform users about using cookies.

Table of Content

  • Simple cookie consent
  • Cookie Message with Options

We will explore the above approaches for designing a Cookies Message Popup with the help of examples.

Simple Cookie Consent

  • The HTML document defines a simple cookie consent popup with a clear message and an acknowledgment button.
  • CSS styles are applied to create an aesthetically pleasing and responsive design for the popup, featuring a fixed position at the bottom, a dark background, and contrasting text and button colors.
  • The popup is fixed at the bottom of the screen, covering the entire width. It includes padding, a subtle box shadow, and a noticeable message to grab the user's attention.
  • The "Got it!" button is styled with a distinctive color scheme and a hover effect to enhance user experience

Example 1: We will design a Simple Cookies Message Popup using HTML and CSS in this example.

HTML
<!DOCTYPE html> <html lang="en">  <head>     <meta charset="UTF-8">     <meta name="viewport"            content="width=device-width,                     initial-scale=1.0">     <title>Cookie Consent Popup</title>     <style>         body {             font-family: 'Arial', sans-serif;             margin: 0;             padding: 0;         }          #cookie-popup {             position: fixed;             bottom: 0;             left: 0;             width: 100%;             background-color: #333;             color: #fff;             text-align: center;             padding: 15px;             box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);         }          #cookie-popup p {             margin: 0;         }          #cookie-popup button {             margin-top: 10px;             background-color: #16bb24;             color: #fff;             border: none;             padding: 10px 20px;             font-size: large;             cursor: pointer;         }          #cookie-popup button:hover {             background-color: #357ae8;         }     </style> </head>  <body>     <div id="cookie-popup">         <p>             This website uses cookies to ensure you get             the best experience on our website.         </p>         <button>             Got it!         </button>     </div> </body>  </html> 

Output:

cookies1

Cookie Message with Options

  • In HTML, the structure of a cookie message popup, featuring an icon, descriptive text, and buttons, are defined.
  • CSS styles are applied to ensure an appealing and responsive design for the cookie popup. This includes setting the position, size, background color, and button styles.
  • The popup is fixed at the bottom left of the screen using CSS, ensuring it remains visible without interfering with the main content.
  • Three buttons are designed for user interaction: "Accept All Cookies," "Necessary Cookies Only," and "Customize Settings." Each button has distinct styling and a hover effect to enhance the visual effect.

Example 2: In this example, we will design a more advanced and styled Cookies Message Popup.

HTML
<!DOCTYPE html> <html lang="en">  <head>     <meta charset="UTF-8">     <meta name="viewport"            content="width=device-width,                    initial-scale=1.0">     <title>Cookies Message Popup</title>     <link rel="stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">     <style>         body {             margin: 0;             font-family: Arial, sans-serif;         }          #cookies-popup {             position: fixed;             bottom: 20px;             left: 20px;             width: 450px;             background: #333;             color: #fff;             padding: 40px;             text-align: center;             box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);             z-index: 1000;             border-radius: 8px;         }          .btn-cont {             display: flex;             margin: 20px 20px;         }          #cookies-popup p {             margin-top: 20px;             margin-bottom: 10px;         }          .btn-cont button {             background: #fff;             color: #333;             border: none;             width: 50%;             padding: 8px 20px;             cursor: pointer;             font-weight: bold;             margin: 5px;             border-radius: 4px;         }          .btn-cust {             padding: 15px 30px;             font-weight: bold;             color: #333;             border: none;             cursor: pointer;             font-size: 15px;             font-weight: bold;             border-radius: 4px;         }          button:hover {             background-color: rgba(196, 218, 214, 0.76);         }     </style> </head>  <body>     <div id="cookies-popup">         <i class='fas fa-cookie-bite'            style='font-size:80px;'>         </i>         <p>               This website uses cookies to ensure you get             the best experience on our website.         </p>         <div class="btn-cont">             <button>Accept All Cookies</button>             <button>Necessary Cookies Only</button>         </div>         <button class="btn-cust">             Customize Settings         </button>     </div> </body>  </html> 

Output:

cookies2

Next Article
Create a Product Detail Page Template using HTML and CSS

S

strikeackr
Improve
Article Tags :
  • Web Technologies
  • Geeks Premier League
  • Web Templates
  • Geeks Premier League 2023

Similar Reads

  • Design a Google Chrome Page Template using HTML and CSS
    Google Chrome Page Template is a replica of Google Chrome Page which can be built with the help of HTML and CSS. This project has fundamental features and design elements, a search option, along with using the FontAwsome Icons, and various CSS styling, which offer you hands-on experience in web desi
    4 min read
  • Create a Product Detail Page Template using HTML and CSS
    In this article, we will create a Product Details Layout Template using HTML & CSS. This Card is generally used in e-commerce websites to make the product more presentable and show details clearly. The card-like structure includes details such as product name, price, and a concise description, p
    4 min read
  • Design a Layered Image Page Template using HTML and CSS
    The article provides a complete guide for creating a layered image layout using HTML and CSS. The Layered Image Page refers to a webpage design that contains layered structured visual elements using images. Here, the design contains two boxes with background images and some empty rounded boxes with
    3 min read
  • Design a Offer Box With Ribbon template using HTML and CSS
    To highlight special offers, discounts, or promotions, offer boxes with ribbons are a common graphic element seen in marketing and promotional materials. Usually, it is just a box or container with the offer inside that is decorated with ribbon to make it look festive and appealing. The ribbon serve
    3 min read
  • Design a Grocery Store Ttemplate using HTML and CSS
    In the article, we will see how to Create a website for a grocery store template using HTML and CSS. It allows customers to browse products, make purchases, and enjoy the convenience of online shopping. The grocery shop app is precisely built to incorporate a navigational header, product divisions f
    5 min read
  • Design a Contact us Page using HTML and CSS
    A Contact Us page is used to allow visitors to contact the website owner or administrator for various purposes, such as asking questions, giving feedback, requesting information, or reporting issues. In this article, we will see how to design a Contact Us page using HTML and CSS. Creating an attract
    4 min read
  • Design a Tribute Page using HTML and CSS
    Making a tribute page is an Innovative way to honor someone special in your life. In this article, we create a tribute webpage using HTML and CSS. This page has a simple and creative design. It contains a header with a title, a main section with text and images, and a footer for main details or cred
    4 min read
  • Design a Contact Page with a Map using HTML and CSS
    In this article, we will design a Contact Page with a Map using HTML and CSS. The Contact Page with the Map is useful and provides users with geographical context for finding your organization or the location more efficiently. Here, we will create the basic contact form for the user to fill out and
    3 min read
  • Design a Responsive Services Section Template using HTML and CSS
    A Services Website plays a vital role in showcasing the different services that a particular company or any other contractor has to offer. In this article, we are going to build a services page, it will illustrate the different components of the services like the title, description, and learn more b
    4 min read
  • Design a Wedding Theme based Page using HTML and CSS
    Designing a wedding-themed webpage is a fun way to capture the joy of this special day. In this article, we'll help you create a beautiful webpage using simple HTML and CSS. PreviewApproachFirslty, create a new file with the "index.html". Include Google Fonts, Font Awesome Icons, and external CSS li
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences