Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • jQuery
  • AngularJS
  • ReactJS
  • Next.js
  • React Native
  • NodeJS
  • Express.js
  • MongoDB
  • MERN Stack
  • PHP
  • WordPress
  • Bootstrap
  • Tailwind
  • CSS Frameworks
  • JS Frameworks
  • Web Development
Open In App
Next Article:
Design a Tribute Page using HTML and CSS
Next article icon

How to Design Homepage like Facebook using HTML and CSS ?

Last Updated : 03 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

HTML:  HTML stands for Hyper Text Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within tag which defines the structure of web pages.

CSS: Cascading Style Sheets, fondly referred to as CSS, is a simply designed language intended to simplify the process of making web pages presentable. CSS allows you to apply styles to web pages. More importantly, CSS enables you to do this independent of the HTML that makes up each web page.

Below is the source code for construction of Facebook like Homepage: 

You can see the Github link to download the complete code of this article. 
 

HTML section: File name is homepage1.html
 

HTML
<!DOCTYPE html> <html>  <head>     <meta charset="UTF-8">     <meta name="viewport" content=         "width=device-width, initial-scale=1.0">     <link rel="stylesheet" type="text/css"          href="new.css" media="screen" /> </head>  <body>     <div class=" header1">         <div id="name" class="header1">             OLD MASTER         </div>         <div id="searcharea" class="header1">             <input placeholder="search here...."                  type="text" id="searchbox" />         </div>         <div id="profilearea" class="header1">Profile</div>         <div id="profilearea1" class="header1">|</div>         <div id="profilearea2" class="header1">Home</div>     </div>     <div class="sidenav">         <div class="bodyn">             <div id="side1" class="bodyn">Profile</div>             <div id="side2" class="bodyn">edit profile</div>             <div id="side3" class="bodyn">News feed</div>             <div id="side4" class="bodyn">Messages</div>             <div id="side5" class="bodyn">Events</div>             <div id="side6" class="bodyn">PAGES</div>             <div id="side7" class="bodyn">Pages feed</div>             <div id="side8" class="bodyn">Like pages</div>             <div id="side9" class="bodyn">Create page</div>             <div id="side10" class="bodyn">Create ad</div>             <div id="side11" class="bodyn">GROUPS</div>             <div id="side12" class="bodyn">New groups</div>             <div id="side13" class="bodyn">Create group</div>             <div id="side14" class="bodyn">APPS</div>             <div id="side15" class="bodyn">Games</div>             <div id="side16" class="bodyn">On this day</div>             <div id="side17" class="bodyn">Games feed</div>             <div id="side18" class="bodyn">FRIENDS</div>             <div id="side19" class="bodyn">Close friends</div>             <div id="side20" class="bodyn">Family</div>             <div id="side21" class="bodyn">INTERESTS</div>             <div id="side22" class="bodyn">Pages and public</div>             <div id="side23" class="bodyn">EVENTS</div>             <div id="side24" class="bodyn">Create event</div>         </div>     </div>     <div class="post00"></div>     <div class="post10"></div>      <div class="header0001"></div>     <div class="sideboxxx"></div>     <div class="sideboxxxx2"></div>     <div class="post">         <div id="column-1" class="post">             update status | add photos/             videos | create photo album             <hr><br><br><br><br><br><br>             <hr>         </div>         <div id="postpos" class="post">             <input type="submit" id="buttonpost" value="post" />         </div>         <div id="postboxpos" class="post">             <textarea placeholder="What's in your mind"                  id="postbox">             </textarea>         </div>     </div>     <div class="post1">         <img src="mini1.png" alt="image is here"              height="40" width="40" /><br>         <img src="mini......png" alt="image is here"              height="400" width="575" /><br><br>         <p6>Like Comment Share</p6><br>         <hr>         <p1>Amit Deb</p1>         <p2> and</p2>         <p1> 5 others</p1>         <p2> like this</p2>         <div id="post2text" class="post1">             <p3>Rani Mukharji </p3>             <p2>with </p2>             <p1> Arup Pegu</p1>             <p2> and</p2>             <p1> 15 others.</p1><br>             <p4>4 hrs.</p4>         </div>         <div id="commentprof2" class="post1">             <img src="mini1.png" alt="image is here"                  height="25" width="25" id="profpic" />         </div>         <div id="commentboxpos2" class="post1">             <input type="text" placeholder="comment"                  id="commentbox" />         </div>     </div>     <div class="sidebox">         <div id="sidebox1" class="sidebox">             <div id="sideboxx1">YOUR PAGES</div>             <hr><br><br>See all             <hr>             <div id="sideboxx2">                 This Week             </div><br><br>See more             <hr>             <div id="sideboxx3">                 Recent Posts             </div><br><br>See more             <hr>             <div id="sideboxx4">                 You haven't posted in this days             </div><br><br><br>See all         </div>          <div id="post1pos" class="sidebox">             <input type="submit" id="buttonpost1"                  value="write a post" />         </div>     </div>     <div class="sideboxxx2">         <div id="sidebox2" class="sideboxxx2">             <hr>             <div id="sideboxx21">Trending</div>             <br><br><br>See more             <hr>             <div id="sideboxx22">                 Suggested Pages             </div><br><br><br>See all             <hr>             <div id="sideboxx23">                 People you may know             </div><br><br><br><br>See all         </div>     </div> </body>  </html> 

 
 

CSS section: File name is new.css

Download the HTML, CSS and images files from Github and save all files in a folder and run homepage1.html file. It will display the result.

Output:

fb-copy




Next Article
Design a Tribute Page using HTML and CSS

M

miniyadav1
Improve
Article Tags :
  • Web Technologies
  • Web Templates

Similar Reads

  • How to design Meet the Team Page using HTML and CSS ?
    You will learn how to create a simple and responsive “Meet the Team” page using HTML and CSS. We will use HTML to structure the content of the page, such as the headings, paragraphs, images, and links, and then we use CSS to style the elements of the page, such as the colors, fonts, and layout. Here
    5 min read
  • Design a Feedback Form using HTML and CSS
    The article shows how to create the Feedback Form using HTML and CSS. A feedback form provides a structured way for users to share their opinions, suggestions, and concerns. These forms are essential for gathering feedback from users crucial for businesses and websites to understand user experiences
    3 min read
  • How to Create Image Hovered Detail using HTML & CSS?
    In this article, we will learn how to create a type of hover effect over an image to get its complete detail. This is can be achieved by using simple HTML & CSS. Overview Of Our Project: Approach: We will first create an HTML file in which we are going to add an image for our image hanger.We wil
    3 min read
  • Design a Tribute Page using HTML and CSS
    Making a tribute page is an Innovative way to honor someone special in your life. In this article, we create a tribute webpage using HTML and CSS. This page has a simple and creative design. It contains a header with a title, a main section with text and images, and a footer for main details or cred
    4 min read
  • Design a Google Chrome Page Template using HTML and CSS
    Google Chrome Page Template is a replica of Google Chrome Page which can be built with the help of HTML and CSS. This project has fundamental features and design elements, a search option, along with using the FontAwsome Icons, and various CSS styling, which offer you hands-on experience in web desi
    4 min read
  • 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
  • How to Create Badges using HTML and CSS ?
    This article will show you how to create a badge using HTML and CSS. Badges are simple and basic components that are used to display an indicator or count a number. This is quite useful for mail count and alerting purposes, among other things. Badges are identical to labels, with the exception that
    2 min read
  • Design a Layered Image Page Template using HTML and CSS
    The article provides a complete guide for creating a layered image layout using HTML and CSS. The Layered Image Page refers to a webpage design that contains layered structured visual elements using images. Here, the design contains two boxes with background images and some empty rounded boxes with
    3 min read
  • Design a Grocery Store Ttemplate using HTML and CSS
    In the article, we will see how to Create a website for a grocery store template using HTML and CSS. It allows customers to browse products, make purchases, and enjoy the convenience of online shopping. The grocery shop app is precisely built to incorporate a navigational header, product divisions f
    5 min read
  • How to create a CV using HTML and host in GitHub ?
    In today's digital age, having an online presence is crucial, especially when it comes to professional endeavors. One effective way to showcase your skills, experiences, and accomplishments is by creating a compelling curriculum vitae (CV).  In this article, we are going to build a CV using HTML, an
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences