Design a Social Media Profile Card using HTML CSS & JavaScript Last Updated : 23 Jul, 2024 Comments Improve Suggest changes Like Article Like Report To implement and Design a Social Media Profile Card using HTML CSS, and JavaScript language. In this application, we have created an attractive card component that represents the Social Media Profile information of the user. This information includes Profile Image, Name, Designation, Location, Followers, Following, and Social Media Handlers with their redirection links. We have applied an attractive color scheme to the application to make the appearance beautiful. Preview:Prerequisites:HTMLCSSJavaScriptApproach:Create an HTML file with the necessary structure. Include links to external CSS stylesheets, JavaScript files, and external libraries (like Font Awesome and Animate.css).Use a <div> with the class profile card to encapsulate the entire profile card. Set a background gradient using CSS for a visually appealing look.Inside the card, create a profile header section for the user's basic information. Include a profile picture (profile-picture class), user's name, designation, and location.Add a profile-details section to display follower, following, and article count. Use interactive-counter for each count with a <span> for the count and a button to increment the count.Implement JavaScript functions (followersFn, followingFn, articlesFn) to handle count increments and update the corresponding HTML elements.Include a social-links section to display social media icons. Use Font Awesome icons for various social media platforms.Style the profile card and its components using CSS. Apply gradients, box shadows, and border radius for a visually appealing card. Use transitions for interactive elements like buttons and icons.Use Animate.css for animation effects (e.g., fadeIn) to make the application interactive. Example: In this example, we will see the implementation of the Social Media Profile Card using HTML CSS, and JavaScript. HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="styles.css"> <script defer src="app.js"></script> <link rel="stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"> <link rel="stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"> <link href= "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet"> <title>GFG</title> </head> <body> <div class="profile-card animate__animated animate__fadeIn" id="profileCard"> <div class="profile-header"> <div class="profile-picture"> <img src= "https://media.geeksforgeeks.org/wp-content/uploads/20230816191453/gfglogo.png" alt="User Image"> </div> <h2 class="profile-name" style="color: green;"> GeeksforGeeks </h2> <p class="profile-designation">Web Developer</p> <p class="profile-location">Noida, India</p> </div> <div class="profile-details"> <div class="interactive-counter"> <p><strong>Followers:</strong> <span id="followersCount"> 1000 </span> </p> <button onclick="followersFn()">Follow +</button> </div> <div class="interactive-counter"> <p><strong>Following:</strong> <span id="followingCount"> 100 </span> </p> <button onclick="followingFn()">Follow +</button> </div> <div class="interactive-counter"> <p><strong>Articles:</strong> <span id="articlesCount"> 111 </span> </p> <button onclick="articlesFn()">Read +</button> </div> </div> <div class="social-links"> <a href= "https://www.facebook.com/geeksforgeeks.org/" target="_blank" class="social-icon"> <i class="fab fa-facebook" style="color: #1877f2;"></i></a> <a href= "https://twitter.com/geeksforgeeks?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank" class="social-icon"> <i class="fab fa-twitter" style="color: #1da1f2;"></i></a> <a href= "https://www.instagram.com/geeks_for_geeks/?hl=en" target= "_blank" class="social-icon"><i class="fab fa-instagram" style="color: #e1306c;"></i> </a> <a href="#" target="_blank" class="social-icon"> <i class="fab fa-linkedin" style="color: #0077b5;"></i> </a> <a href="#" target="_blank" class="social-icon"> <i class="fab fa-youtube" style="color: #c4302b;"></i> </a> </div> </div> </body> </html> CSS body { margin: 0; display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(to right, #ebe37d, #2F80ED); font-family: 'Montserrat', sans-serif; overflow: hidden; } .profile-card { background-color: #fff; border-radius: 10px; overflow: hidden; width: 300px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); } .profile-header { padding: 20px; text-align: center; background: linear-gradient(to bottom, #c8714e, #8f94fb); color: rgb(255, 255, 255); } .profile-picture img { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 10px; } .profile-name, .profile-designation, .profile-location { margin: 0; } .profile-details { padding: 20px; } .profile-details p { margin: 10px 0; } .interactive-counter { display: flex; justify-content: space-between; align-items: center; } .interactive-counter button { background-color: #4e54c8; color: #fff; border: none; padding: 5px 10px; cursor: pointer; transition: background-color 0.3s ease; } .interactive-counter button:hover { background-color: #8f94fb; } .social-links { display: flex; justify-content: center; margin-top: 10px; } .social-links a { margin: 0 5px; font-size: 1.5em; text-decoration: none; } .social-links i { transition: color 0.3s ease; } .social-links a:hover i { color: #8f94fb; } .social-icon { font-size: 3em; transition: transform 0.3s ease; } .social-icon:hover { transform: scale(1.2); } JavaScript let cnt1 = 1000; let cnt2 = 100; let cnt3 = 111; function followersFn() { cnt1 += 1; document.getElementById('followersCount').innerText = cnt1; } function followingFn() { cnt2 += 1; document.getElementById('followingCount').innerText = cnt2; } function articlesFn() { cnt3 += 1; document.getElementById('articlesCount').innerText = cnt3; } Output: Comment More infoAdvertise with us Next Article Design a Social Media Profile Card using HTML CSS & JavaScript G gauravggeeksforgeeks Follow Improve Article Tags : Project JavaScript Web Technologies Dev Scripter JavaScript-Projects Dev Scripter 2024 +2 More Similar Reads Light/Dark Mode User Profile Card using HTML CSS and JavaScript This article will show how to make an Animated User Profile Card using HTML, CSS, and JavaScript. We generally see these effects in portfolios of professionals. In this, we have created a code that generates a personalized card with the user's name, image, and description. Additionally, we've implem 3 min read Create a Toggle Profile Card Details using HTML CSS and JavaScript In this article, we will develop an interactive Toggle Profile Card Details application using HTML, CSS, and JavaScript Language. In this application, we have a Card Component with the user's details like their profile picture and Name. There is a toggle button, and when the button is clicked, the d 3 min read Design a Subscription Page using HTML and CSS In this article, we will see how to design a Subscription Page using HTML and CSS. The subscription page is a popup that has an input field for email ID and a button to subscribe the newsletter. We create a card that have an input box and a submit button, enabling users to subscribe to any newslette 2 min read Design a School Website in HTML CSS and JavaScript A School Website developed using HTML, CSS, and JavaScript is an interactive platform that provides information about the school, its faculty, courses, events, and other relevant details. It incorporates responsive design principles to ensure compatibility across various devices, offering an engagin 8 min read How to Create a GitHub Profile Search using HTML CSS and JavaScript ? In this article, we will be developing an interactive GitHub Profile Search application using HTML, CSS, and JavaScript Language. In this application, there is a search bar where users can enter the username that they want to view. After entering the username, an API call is been triggered, and the 4 min read Design a Nested Chat Comments using HTML CSS and JavaScript In this article, we will learn how to create Nested Comments using JavaScript. We must have seen it on social media like Facebook, Instagram, Youtube, Twitter, etc. We have seen the use of the nested comment in the comment section of these social sites.Approach:Create a folder nested-comments on you 2 min read Design a Student Attendance Portal in HTML CSS & JavaScript The Student Attendance Portal is a web application that allows users to mark attendance for students in different classes, add class and students according to requirements, providing a user-friendly interface to update and visualize attendance records. Final Output PreviewApproach:In the first step, 10 min read Create a Testimonial box switcher using HTML CSS & JavaScript In this article, we will develop an interactive Testimonial box switcher application using HTML CSS & JavaScript Language.In this application, we have a Card component that has the message given by the testimonial, also there is information about the person and his/her designation. The card comp 4 min read Create an Online Payment Project using HTML CSS & JavaScript In this article, We will create a responsive online payment page using HTML, CSS & Javascript.Here, we will learn about the project's structure before beginning to code each page individually. To ensure adequate understanding, we also gave the project's output after it was created.Prerequisites: 4 min read How to Align Social Media Icons Vertically on Left Side using HTML CSS & JavaScript? In this article, we will learn how to create vertically aligned social media icons on the left side of a webpage using HTML, CSS, and JavaScript. We will use HTML to create the basic structure, CSS for styling, and JavaScript for added functionality.PrerequisitesHTMLCSSJavaScriptApproachWe are using 4 min read Like