• About
  • Contact Us
  • Privacy & policy
  • Term & Conditions
iMe creative
  • BLOGS
  • HTML & CSS
  • Tailwind CSS
No Result
View All Result
  • BLOGS
  • HTML & CSS
  • Tailwind CSS
No Result
View All Result
iMe creative
No Result
View All Result

How to create a WhatsApp clone using HTML and CSS

Sinthu by Sinthu
June 19, 2023
in HTML & CSS
1
How to create WhatsApp clone using HTML and CSS

Hello developers! Are you looking to improve your HTML and CSS skills by creating a fully functional WhatsApp clone? In this tutorial, we’ll guide you through the process of building a responsive and visually appealing chat app interface using these popular web development technologies.

Getting Started with Your WhatsApp Clone Project

By following our step-by-step instructions, you’ll learn how to create a basic HTML structure with search boxes, lists, and icons, and then use CSS properties to style and customize the design to resemble the familiar WhatsApp interface. We’ll also provide you with the complete source code for this WhatsApp clone, so you can compare it with your own code and identify any potential errors or issues.

Building the Project Structure | HTML and CSS

1.Create a new folder and files: To begin, create a new folder on your computer to store all your project files related to the WhatsApp clone. Inside this folder, create two new files: “index.html” and “style.css”. These files will serve as the foundation for your project.

2. Set up the HTML document: Open the “index.html” file in your preferred text editor and start by adding the basic HTML structure. This includes the , , and tags, which form the backbone of your web page.

3. Link the CSS file: Within the tag of your HTML document, create a tag that will link your “style.css” file to your HTML file. This allows you to apply CSS styles and make your WhatsApp clone visually appealing.

4. Create the layout: Now it’s time to create the layout for your WhatsApp clone. Add the necessary HTML elements to construct the basic structure, such as a search box, a list of contacts, and icons for various actions. This will form the foundation of your chat app interface.

Styling Your WhatsApp Clone with CSS

Use CSS (Cascading Style Sheets) to style the different components of your WhatsApp clone. Apply appropriate styles to the search box, contact list, icons, and any other elements you’ve added to achieve a design that closely resembles the WhatsApp interface. Experiment with colors, fonts, and spacing to create an appealing visual experience.

Adding Functionality to Your WhatsApp Clone

1. Implement functionality: Once you have the HTML structure and CSS styles in place, it’s time to add functionality to your WhatsApp clone. Follow the step-by-step instructions provided in the tutorial to implement features such as sending and receiving messages, displaying message history, and managing contacts. JavaScript can be utilized for dynamic behavior and interactivity.

2. Test and debug: After implementing the functionality, it’s crucial to thoroughly test your WhatsApp clone. Compare your code with the provided source codes to identify any errors or issues. Make necessary changes to your code and test your clone in different browsers and devices to ensure it works seamlessly and is responsive across various platforms.

Publishing Your WhatsApp Clone

Once you’re satisfied with the functionality and design of your WhatsApp clone, it’s time to share it with others. You can choose to publish it online using hosting platforms or deploy it to your own server. Share the link with your friends, colleagues, and fellow developers to showcase your skills and accomplishment.

Unlocking Your Web Development Potential with a WhatsApp Clone

Finally, By following these step-by-step instructions and utilizing HTML and CSS, you can create your very own WhatsApp clone. This project not only enhances your web development skills but also allows you to dive deeper into creating functional chat app interfaces. Remember to refer to the accompanying video tutorial for visual guidance and code examples.

Video Tutorial

Whatsapp clone using HTML and CSS

Source Codes

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="styles.css">
    <link rel="shortcut icon" type="image/jpg" href="whatsapp.png">
    <title>WhatsApp</title>
</head>
<body>
    <div class="sidebar">
        <div class="header">
            <div class="avatar">
                <img src="avatar.png" alt="">
            </div>
            <div class="chat-header-right">
                <img src="circle-notch-solid.svg" alt="">
                <img src="chat.svg" alt="">
                <img src="more.svg" alt="">
            </div>
        </div>
        <div class="sidebar-search">
            <div class="sidebar-search-container">
                <img src="search-solid.svg" alt="">
                <input type="text" placeholder="Search or start new chat">
            </div>
        </div>
        <div class="sidebar-chats">
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Amelia Cuiree</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
            <div class="sidebar-chat">
                <div class="chat-avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="chat-info">
                    <h4>Mike Daisan</h4>
                    <p>Last Message</p>
                </div>
                <div class="time">
                    <p>2:44 pm</p>
                </div>
            </div>
        </div>
    </div>
    <div class="message-container">
        <div class="header">
            <div class="chat-title">
                <div class="avatar">
                    <img src="avatar.png" alt="">
                </div>
                <div class="message-header-content">
                    <h4>Amelia Cuiree</h4>
                    <p>online</p>
                </div>
            </div>
            <div class="chat-header-right">
                <img src="search-solid.svg" alt="">
                <img src="more.svg" alt="">
            </div>
        </div>
        <div class="message-content">
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message">This is a message <span class="chat-timestamp">11:33 pm</span></p>
            <p class="chat-message chat-sent">This is a message <span class="chat-timestamp">11:33 pm</span></p>
        </div>
        <div class="message-footer">
            <img src="smile.svg" alt="">
            <img src="paper-clip.svg" alt="">
            <input type="text" placeholder="Type a message">
            <img src="microphone.svg" alt="">
        </div>
    </div>
</body>
</html>

style.css

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #303030;
    font-family: 'Roboto', sans-serif;
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: none;
}
::-webkit-scrollbar-thumb {
    background: #b9b3ae;
}
::-webkit-scrollbar-thumb:hover {
    background: #888;
}
.avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}
.avatar img,
.chat-avatar img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-header-right img {
    width: 20px;
    height: 20px;
    margin: 5px 13px;
    opacity: 0.4;
}
body {
    display: flex;
    overflow: hidden;
}
.sidebar {
    flex: 5.17;
}
.header {
    background-color: #ededed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}
.sidebar-search {
    display: flex;
    align-items: center;
    background-color: #f6f6f6;
    padding: 8px 15px;
}
.sidebar-search-container {
    display: flex;
    align-items: center;
    background-color: white;
    width: 100%;
    height: 35px;
    border-radius: 20px;
}
.sidebar-search-container img {
    width: 15px;
    height: 15px;
    margin: 0 15px;
    opacity: 0.4;
}
.sidebar-search-container input {
    border: none;
    outline: none;
    margin-left: 20px;
}
.chat-avatar {
    position: relative;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex: 1;
}
.sidebar-chats {
    height: calc(100vh - 115px);
    overflow-y: scroll;
}
.sidebar-chat {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    width: 100%;
}
.sidebar-chat:hover {
    background-color: #f5f5f5;
}
.sidebar-chat:nth-child(2) {
    background-color: #ebebeb;
}
.sidebar-chat::before {
    content: '';
    position: absolute;
    width: 80%;
    bottom: 0;
    left: 80px;
    border-bottom: 1px solid #999;
    opacity: 0.2;
}
.chat-info {
    margin-left: 15px;
    flex: 10;
}
.chat-info p {
    font-size: 13px;
    line-height: 20px;
    color: gray;
}
.time {
    flex: 1;
}
.time p {
    white-space: nowrap;
    font-size: 13px;
    margin-top: -16px;
    color: gray;
}
/* Message Content */
.message-container {
    flex: 12;
}
.chat-title {
    display: flex;
    align-items: center;
}
.message-header-content {
    margin-left: 15px;
}
h4 {
    font-weight: 400;
}
.message-header-content p {
    font-size: 13px;
    color: gray;
}
.message-content {
    background-image: url(background.png);
    background-position: center;
    height: calc(100vh - 120px);
    padding: 20px 80px;
    overflow-y: scroll;
}
.chat-message {
    font-size: 14px;
    padding: 8px 10px;
    width: fit-content;
    border-radius: 8px;
    background-color: white;
    margin-bottom: 30px;
}
.chat-sent {
    margin-left: auto;
    background-color: #dcf8c6;
}
.chat-timestamp {
    margin-left: 10px;
    font-size: 10px;
    color: grey;
}
/* message footer */
.message-footer {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f0f0f0;
}
.message-footer img {
    flex: 1;
    width: 22px;
    height: 22px;
    opacity: 0.4;
}
.message-footer input {
    flex: 20;
    margin: 5px 10px;
    padding: 12px 15px;
    outline: none;
    border: none;
    border-radius: 20px;
    font-size: 15px;
}

Don’t forget to Subscribe to our YouTube Channel for more.

Subscribe to iMe creative

Download complete source code and images
Tags: chat app uichat applicationwhatsapp clonewhatsapp web design
Previous Post

How to create Responsive Admin Dashboard using HTML and CSS

Next Post

Complete Responsive Personal Portfolio Website using HTML CSS

Sinthu

Sinthu

Next Post
Complete Responsive Personal Portfolio Website using HTML CSS

Complete Responsive Personal Portfolio Website using HTML CSS

Comments 1

  1. Camillat says:
    12 months ago

    This article offers a fascinating perspective on the subject. The depth of research and clarity in presentation make it a valuable read for anyone interested in this topic. It’s refreshing to see such well-articulated insights that not only inform but also provoke thoughtful discussion. I particularly appreciated the way the author connected various aspects to provide a comprehensive understanding. It’s clear that a lot of effort went into compiling this piece, and it certainly pays off. Looking forward to reading more from this author and hearing other readers’ thoughts. Keep up the excellent work!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Connect with us

Popular post

website like youtube

How to create Website like YouTube

June 20, 2023
How to Create Responsive Admin Dashboard using HTML, CSS and JS

How to Create Responsive Admin Dashboard using HTML, CSS and JS

June 20, 2023
How To Create Responsive Admin Dashboard Using HTML, CSS & JS For Hospital Management System

How To Create Responsive Admin Dashboard Using HTML, CSS & JS For Hospital Management System

June 20, 2023
responsive admin dashboard

How to create Responsive Admin Dashboard using HTML and CSS

June 20, 2023

Recent

The Rise of AI-Powered Search Engines: How They’re Changing the Game in 2025

The Rise of AI-Powered Search Engines: How They’re Changing the Game in 2025

April 4, 2025
AI-Powered Search: The Future of Information Retrieval

AI-Powered Search: The Future of Information Retrieval

April 2, 2025
AI-Powered Code Generation: Is This the Future of Software Development?

AI-Powered Code Generation: Is This the Future of Software Development?

April 1, 2025

ime creative

Welcome to imecreative.com, a website dedicated to the world of web designing and development. We are a team of passionate professionals with years of experience in this field, committed to sharing our knowledge and expertise with our readers.

Browse by Category

  • BLOGS
  • HTML & CSS
  • INTERVIEW QUESTIONS
  • Next Js
  • Tailwind CSS
  • Uncategorized
The Rise of AI-Powered Search Engines: How They’re Changing the Game in 2025

The Rise of AI-Powered Search Engines: How They’re Changing the Game in 2025

April 4, 2025
AI-Powered Search: The Future of Information Retrieval

AI-Powered Search: The Future of Information Retrieval

April 2, 2025
AI-Powered Code Generation: Is This the Future of Software Development?

AI-Powered Code Generation: Is This the Future of Software Development?

April 1, 2025
  • About
  • Contact Us
  • Privacy & policy
  • Term & Conditions

© 2023 ime creative

No Result
View All Result
  • Home 1
  • BLOGS
  • HTML & CSS
  • Tailwind CSS
  • About
  • Contact Us
  • Privacy & policy

© 2023 ime creative