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.

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.

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.

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.

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.

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.

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.

Whatsapp clone using HTML and CSS



    
    
    
    
    
    
    
    
    WhatsApp


    
        
            
                
            
            
                
                
                
            
        
        
            
                
                
            
        
        
            
                
                    
                
                
                    

Mike Daisan

                    
Last Message
2:44 pm

Amelia Cuiree

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Mike Daisan

                    
Last Message
2:44 pm

Amelia Cuiree

                    
online
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
This is a message 11:33 pm
* {
    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.

Tags: chat app uichat applicationwhatsapp clonewhatsapp web design