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:
Design a Cookies Message Popup Template using HTML and CSS
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.