How to Create Google logo with HTML and CSS ? Last Updated : 12 Mar, 2024 Comments Improve Suggest changes Like Article Like Report The Google logo is a globally recognized symbol of the tech giant, known for its colourful and playful design. It consists of the word "Google" in a unique font, with each letter in a different colour, representing the company's diverse range of products and services. In this article, we will design the Google logo with the help of HTML and CSS. Approach to create Google Logo:Create a HTML structure consists of a container <div> with an ID of 'container' and a logo <div> with an ID of 'logo'. Inside the logo <div>, there is a <div> with a class of 'g-line' and four <span> elements with classes of 'red', 'yellow', 'green', and 'blue'.The CSS file (style.css) contains the styles for the Google logo. The 'g-line' class is used to create the letter 'G' in the logo, and the 'red', 'yellow', 'green', and 'blue' classes are used to create the colors of the logo.The colors of the logo are created using the 'red', 'yellow', 'green', and 'blue' classes. Each <span> element represents a color, and the background color of each <span> is set to the corresponding color.The 'g-line' class is used to style the letter 'G' in the logo. It sets the width, height, and background color of the 'G' to create the shape of the letter.The logo is designed to be responsive and work well on different screen sizes. The CSS styles are applied using relative units such as percentages and ems to ensure that the logo scales appropriately on different devices and screen resolutions.Example: Implementation to design the logo of Google. HTML <!DOCTYPE html> <html lang="en"> <head> <title>Google Logo</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> </head> <body> <div id="container"> <div id="logo"> <div class="g-line"></div> <span class="red"></span> <span class="yellow"></span> <span class="green"></span> <span class="blue"></span> </div> </div> </body> </html> CSS @import url('https://fonts.googleapis.com/css?family=Roboto'); html, body { background: #f1f1f1; margin: 0; min-height: 100%; font-family: 'Roboto', sans-serif; } #container { position: relative; margin: 50px auto 0; width: 1000px; height: 300px; } #logo { position: relative; width: 300px; height: 300px; border-radius: 50%; margin: 0 auto; overflow: hidden; border: 25px solid #f1f1f1; box-shadow: 0 0px 4px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.24); } #logo::after { content: ''; display: block; width: 60%; height: 60%; border-radius: 50%; background: #f1f1f1; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; z-index: 4; } #logo::before { content: ''; display: block; width: 35%; height: 32%; background: #f1f1f1; position: absolute; right: 0; bottom: 50%; transform: rotateZ(45deg); -webkit-transform: rotateZ(45deg); z-index: 10; } .g-line, .yellow, .green, .blue, .red { position: absolute; z-index: 2; } .g-line { width: 50%; height: 20%; background: #0091ea; right: 0; margin: auto; border-bottom-right-radius: 4px 20px; top: 0; bottom: 0; z-index: 15; } .yellow { width: 40%; height: 40%; left: -15%; bottom: 32%; background: #ffc107; transform: rotateZ(-48deg); -webkit-transform: rotateZ(-48deg); z-index: 3; } .green { width: 100%; height: 50%; bottom: 0; border-radius: 0 0 100% 100%; background: #4caf50; } .blue { width: 35%; height: 32%; background: #0091ea; right: 0; top: 50%; transform: rotateZ(45deg); -webkit-transform: rotateZ(45deg); } .red { width: 81%; height: 50%; top: 0; background: #f44336; } Output: Comment More infoAdvertise with us Next Article How to Create Google logo with HTML and CSS ? P pradeep6036ymca Follow Improve Article Tags : HTML Similar Reads How to create a Hero Image using HTML and CSS ? A Hero Image is a large image with text, often placed at the top of a webpage. Hero images can be designed using HTML and CSS. This article contains two sections. The first section attaches the image and designs the basic structure. The second section designs the images and texts on the images. The 2 min read Create GeeksforGeeks logo using HTML and CSS Creating a logo using HTML and CSS involves designing graphical elements with HTML tags, styling them using CSS properties such as colors, sizes, and positions, and possibly incorporating SVG graphics or images. This approach allows for custom, scalable, and interactive logo designs on web pages. Ge 2 min read How to Create a Cutout Text using HTML and CSS ? Cutout text is used as a background header of the webpage. The cutout text creates an attractive look on the webpage. To create a cutout text we will use only HTML and CSS. We display the cutout text and then we make the text blending of an elementâs background with the elementâs parent. The CSS mix 2 min read How to Create Neon Light Button using HTML and CSS? The neon light button animation effect can be easily created by using HTML and CSS. By using HTML, we will design the basic structure of the button and then by using the CSS, we can create the neon light animation effect. HTML code: In this section, we will design a simple button structure using anc 2 min read How to Import Google Fonts in HTML? Choosing the right font for your webpage is a very important aspect of any design. Using a web font service enables you to use a wide variety of fonts fit for presenting the data on your webpage. Google Fonts is a free web font service that hosts a huge variety of fonts to choose from. We can use th 2 min read Like