Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How to make Awesome Radar Animation using HTML & CSS

    8 May 2025

    How to create Cross Road Game using HTML CSS and JS

    2 May 2025

    How to create 3D Animated Bee website using HTML CSS and JS

    28 April 2025
    Facebook X (Twitter) Instagram YouTube Telegram Threads
    Coding StellaCoding Stella
    • Home
    • Blog
    • HTML & CSS
      • Login Form
    • JavaScript
    • Hire us!
    Coding StellaCoding Stella
    Home - HTML & CSS - How to make Facebook Login page using HTML & CSS
    HTML & CSS

    How to make Facebook Login page using HTML & CSS

    Coding StellaBy Coding Stella14 January 2024No Comments4 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Email WhatsApp Copy Link

    Hey folks! Today, let’s dive into creating a Facebook Login page using HTML and CSS. It’s a straightforward process, perfect for both beginners and experienced coders.

    We’ll use HTML for structuring our page and CSS for styling to mimic the familiar look of the Facebook Login page. No need for complex setups – just simple coding to replicate the Facebook experience.

    Join me in this quick and easy coding session. Whether you’re learning or just want to add a Facebook-style login to your project, this tutorial is for you. Ready to get started on your own Facebook Login page? Let’s make it happen with HTML and CSS!

    HTML :

    The provided code is an HTML document that represents a Facebook login page. It includes a container with a Facebook logo and a form for users to enter their email or phone number and password. There are also options for users to recover their password or create a new account.

    <!DOCTYPE html>
    <html lang="en" >
    <head>
      <meta charset="UTF-8">
      <title>Facebook Login Page</title>
      <link rel="stylesheet" href="./style.css">
    
    </head>
    <body>
    <!-- partial:index.partial.html -->
    <div class="container flex">
      <div class="facebook-page flex">
        <div class="text">
          <h1>facebook</h1>
          <p>Connect with friends and the world </p>
          <p> around you on Facebook.</p>
        </div>
        <form action="#">
          <input type="email" placeholder="Email or phone number" required>
          <input type="password" placeholder="Password" required>
          <div class="link">
            <button type="submit" class="login">Login</button>
            <a href="#" class="forgot">Forgot password?</a>
          </div>
          <hr>
          <div class="button">
            <a href="#">Create new account</a>
          </div>
        </form>
      </div>
    </div>
    <!-- partial -->
      
    </body>
    </html>
    

    CSS :

    The provided CSS code styles a Facebook login page. It sets the font family to “Roboto” and applies various styles to different elements such as the container, form, input fields, buttons, and media queries for responsive design. The styles include colors, sizes, margins, padding, borders, and transitions to create a visually appealing and user-friendly login page.

    @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Roboto", sans-serif;
    }
    
    .flex {
      display: flex;
      align-items: center;
    }
    
    .container {
      padding: 0 15px;
      min-height: 100vh;
      justify-content: center;
      background: #f0f2f5;
    }
    
    .facebook-page {
      justify-content: space-between;
      max-width: 1000px;
      width: 100%;
    }
    
    .facebook-page .text {
      margin-bottom: 90px;
    }
    
    .facebook-page h1 {
      color: #1877f2;
      font-size: 4rem;
      margin-bottom: 10px;
    }
    
    .facebook-page p {
      font-size: 1.75rem;
      white-space: nowrap;
    }
    
    form {
      display: flex;
      flex-direction: column;
      background: #fff;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
      max-width: 400px;
      width: 100%;
    }
    
    form input {
      height: 55px;
      width: 100%;
      border: 1px solid #ccc;
      border-radius: 6px;
      margin-bottom: 15px;
      font-size: 1rem;
      padding: 0 14px;
    }
    
    form input:focus {
      outline: none;
      border-color: #1877f2;
    }
    
    ::placeholder {
      color: #777;
      font-size: 1.063rem;
    }
    
    .link {
      display: flex;
      flex-direction: column;
      text-align: center;
      gap: 15px;
    }
    
    .link .login {
      border: none;
      outline: none;
      cursor: pointer;
      background: #1877f2;
      padding: 15px 0;
      border-radius: 6px;
      color: #fff;
      font-size: 1.25rem;
      font-weight: 600;
      transition: 0.2s ease;
    }
    
    .link .login:hover {
      background: #0d65d9;
    }
    
    form a {
      text-decoration: none;
    }
    
    .link .forgot {
      color: #1877f2;
      font-size: 0.875rem;
    }
    
    .link .forgot:hover {
      text-decoration: underline;
    }
    
    hr {
      border: none;
      height: 1px;
      background-color: #ccc;
      margin-bottom: 20px;
      margin-top: 20px;
    }
    
    .button {
      margin-top: 25px;
      text-align: center;
      margin-bottom: 20px;
    }
    
    .button a {
      padding: 15px 20px;
      background: #42b72a;
      border-radius: 6px;
      color: #fff;
      font-size: 1.063rem;
      font-weight: 600;
      transition: 0.2s ease;
    }
    
    .button a:hover {
      background: #3ba626;
    }
    
    @media (max-width: 900px) {
      .facebook-page {
        flex-direction: column;
        text-align: center;
      }
    
      .facebook-page .text {
        margin-bottom: 30px;
      }
    }
    
    @media (max-width: 460px) {
      .facebook-page h1 {
        font-size: 3.5rem;
      }
    
      .facebook-page p {
        font-size: 1.3rem;
      }
    
      form {
        padding: 15px;
      }
    }

    Great job! Now you’ve got a simple Facebook Login page using HTML and CSS. Whether you’re a beginner or a coding pro, this tutorial showed you how to structure and style a basic login form. Feel free to customize it to suit your projects or use it as a starting point for more complex web development.

    If you ever find yourself facing any problems with your project, fear not. Click the Download button, secure the source code, and tackle your coding obstacles head-on. Enjoy your coding journey!

    Facebook Facebook login page login form registration form
    Share. Copy Link Twitter Facebook LinkedIn Email WhatsApp
    Previous ArticleHow to make Sidebar Menu using HTML CSS & JavaScript
    Next Article How to make Netflix Login page using HTML & CSS
    Coding Stella
    • Website

    Related Posts

    HTML & CSS

    How to make Awesome Radar Animation using HTML & CSS

    8 May 2025
    HTML & CSS

    How to make Cool Loading Animation using HTML & CSS

    18 April 2025
    HTML & CSS

    How to make Magic Social Share Menu using HTML CSS and JS

    14 April 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Trending Post

    Master Frontend in 100 Days Ebook

    2 March 202419K Views

    How to make Modern Login Form using HTML & CSS | Glassmorphism

    11 January 202416K Views

    How to make I love you Animation in HTML CSS & JavaScript

    14 February 202414K Views

    How to make Valentine’s Day Card using HTML & CSS

    13 February 202412K Views
    Follow Us
    • Instagram
    • Facebook
    • YouTube
    • Twitter
    ads
    Featured Post

    How to make Flip A Coin using HTML CSS & JavaScript

    11 April 2024

    How to Make Login Form with Captcha in HTML, CSS & JavaScript

    11 January 2024

    What is HTML? Understanding the Basics of Hypertext Markup Language

    31 January 2024

    Master Frontend in 100 Days Ebook

    2 March 2024
    Latest Post

    How to make Awesome Radar Animation using HTML & CSS

    8 May 2025

    How to create Cross Road Game using HTML CSS and JS

    2 May 2025

    How to create 3D Animated Bee website using HTML CSS and JS

    28 April 2025

    How to create Animated File Upload Modal using JavaScript

    23 April 2025
    Facebook X (Twitter) Instagram YouTube
    • About Us
    • Privacy Policy
    • Return and Refund Policy
    • Terms and Conditions
    • Contact Us
    • Buy me a coffee
    © 2025 Coding Stella. Made with 💙 by @coding.stella

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Looks like you're using an ad blocker. We rely on advertising to help fund our site.
    Okay! I understood