The Wayback Machine - https://web.archive.org/web/20240813065902/https://www.geeksforgeeks.org/create-geeksforgeeks-logo-using-html-and-css/
Open In App

Create GeeksforGeeks logo using HTML and CSS

Last Updated : 21 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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.

GeeksforGeeks is an online study platform and we will see how to design a GeeksforGeeks logo using HTML and CSS only.

Steps:

Step 1: To create the GFG logo, use two inline divs for circles, wrapped in a flex-display wrapper div. Apply a 10px solid green border for the outline.

Step 2: Now create a triangle on both the circles using the pseudo-element: “after” and absolute position property. After applying the triangle we will get the shape like this.

Here the triangle’s background-colors are yellow, this is just for explanation. Change the background-color of triangles into white.

After applying the white background color into the triangles the result is :

Step 3: Now using the pseudo-element :before and position absolute property, create a square. You can apply this rule to any of the circles. The resulting logo looks like this:

Approach:

  • Create two divs having classes named circle1 and circle2, and wrap them into a parent div having the class named wrapper.
  • Now assign the CSS property to the wrapper class and style both the circles 
  • Add the invisible triangles into both the circles using pseudo-element :after
  • Now add square onto the logo using before pseudo-element (we are not using after (pseudo-element) because we already used it for creating triangle).

Example: In this code we will see the implementation of geeksforgeeks logo using htnl and CSS .

HTML
<!DOCTYPE html>
<html>

<head>
    <style>
        .wrapper {
            display: flex
        }

        #circle {
            height: 100px;
            width: 100px;
            border: 20px solid green;
            border-radius: 100px;
            position: relative;
        }

        #circle:after {
            content: "";
            position: absolute;
            border-top: 100px solid transparent;
            top: -35px;
        }

        .circle1:after {
            border-left: 140px solid white;
            left: -50px;
            top: -35px;
        }

        .circle2:after {
            border-right: 140px solid white;
            right: -50px;
        }

        .circle1:before {
            content: "";
            height: 20px;
            width: 276px;
            position: absolute;
            background: green;
            left: -18px;
            top: 45px;
            z-index: 1;
        }
    </style>
</head>

<body>
    <div class="wrapper">
        <div id="circle" class="circle1"></div>
        <div id="circle" class="circle2"></div>
    </div>
</body>

</html>

Output:



Similar Reads

How to create GeeksforGeeks logo using p5.js ?
In this article, we will see how to create a GeeksforGeeks logo using p5.js. Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. We can create different types of arts using our coding skills example is like games, animation And physics engines, etc. Approach: Set the function s
2 min read
How to Create Google logo with HTML and CSS ?
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. Ap
3 min read
How to align a logo image to center of navigation bar using HTML and CSS ?
The navigation bar is an essential component of a website that helps users to navigate between different pages. It is usually located at the top of the page and consists of a list of horizontal links, logos, and other elements. The alignment of logos can be adjusted using CSS. In this tutorial, we will focus on how to align the logos to the center
2 min read
Instagram Logo/Icon using HTML and CSS
An animated representation of the Instagram logo using HTML and CSS is displayed as a colorful circular shape with a radial gradient background. Hovering over the logo triggers a subtle upward movement. The white highlights and the text "Instagram Logo" add to the visual appeal and provide context. The project showcases a visually appealing and int
3 min read
How to set logo inside loader using CSS ?
In this article, we will learn how to set logo inside the loader using CSS. A loader is any animation that alerts the visitor/user about the current page that is loading at the moment, and you will have to wait for a few seconds for it to load completely. Loaders are generally helpful when any website takes too long to fetch the results, instead of
4 min read
How to add icon logo in title bar using HTML ?
Adding an icon logo in the title bar, commonly known as a favicon, is a simple yet effective way to enhance website recognition and SEO. This small image or icon appears next to the webpage title in the browser's tab, helping users quickly identify and differentiate between multiple open tabs. By using the &lt;link&gt; tag with the rel attribute se
2 min read
How to Align navbar logo to the left screen using Bootstrap ?
It is very easy in Bootstrap to align items left and right by using the bootstrap classes. By default, it sets to left. If you want to align items center or right then it will be done by yourself. To align the navbar logo to the left of the screen with the Bootstrap method is a quick trick that can save you from writing extra CSS. In this, we simpl
2 min read
Create GeeksforGeeks Clone Using HTML CSS & JavaScript
In this article, we'll make a clone of the GeeksforGeeks website. The clone includes home, about, courses, and contact pages. On the home page, we've added sections like categories, features, testimonials, and FAQs, similar to the GFG website. We named our clone GeeksforGeeks 2.0 to avoid copyright issues. The about page showcases achievements and
15+ min read
How to Add Custom Logo to WordPress Website ?
Logos are the brand identity that represents the whole brand or company. Adding a custom logo to your WordPress website can make a big difference in how your site looks and feels. A custom logo helps to brand your website and make it stand out. Many website owners want to know how to add a custom logo to their WordPress website because it's a simpl
5 min read
How to Add a Logo to the React Bootstrap Navbar ?
In this article, we will see how to add the Logo to the Navbar using React Bootstrap. The Navbar or Navigation bar is one of the most important UI components for dynamic and single-page applications. The navbar provides a better user experience and navigation over different components. In this navigation bar, we can perform different customizations
3 min read
three90RightbarBannerImg