Skip to content
No results
  • Home
  • Quizzes
    • HTML Quiz
    • CSS Quiz
    • JavaScript Quiz
  • HTML & CSS
    • Card Designs
    • Navbars
    • Login Forms
  • JavaScript
    • JavaScript Games
    • API Projects
  • Web Development
    • Frontend
    • Backend
  • Interview Questions
  • Home
  • About us
  • Contact Us
  • Privacy Policy
  • Quizzes
Coding Torque

Learn by projects🚀

  • Home
  • Quizzes
    • HTML Quiz
    • CSS Quiz
    • JavaScript Quiz
  • HTML & CSS
    • Card Designs
    • Navbars
    • Login Forms
  • JavaScript
    • JavaScript Games
    • API Projects
  • Web Development
    • Frontend
    • Backend
  • Interview Questions
Coding Torque

Learn by projects🚀

Login Form with Nav Tabs using HTML and CSS

Login Form with Nav Tabs using HTML and CSS

  • Piyush PatilPiyush Patil
  • May 14, 2023
  • HTML & CSS, Frontend, Intermediate, Login Forms, Web Design, Web Development
Share your love

Are you looking for a sleek and modern way to display login options on your website? Consider creating a “Login Form with Nav Tabs” using only HTML and CSS. In this tutorial, we’ll show you step-by-step how to create a visually stunning and easy-to-use login form with navigation tabs using these two languages. You’ll learn how to use HTML to create the structure of the form and style it with CSS to give it a professional and modern appearance. Plus, you’ll gain valuable experience in using CSS to create dynamic and responsive designs. By the end of this tutorial, you’ll have a functional and visually appealing “Login Form with Nav Tabs” that you can use to enhance the user experience on your website. So, let’s get started on creating a beautiful and unique login form using HTML and CSS!

Before we start here are 50 projects to create using HTML CSS and JavaScript –

  • 50 HTML CSS and JavaScript Projects you should create

I would recommend you don’t just copy and paste the code, just look at the code and type by understanding it.

Demo

Login Form with Nav Tabs using HTML and CSS

HTML Code 

Starter Template

<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSS -->
    <link rel="stylesheet" href="style.css">

   
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" 
          rel="stylesheet"
        integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" 
         crossorigin="anonymous">


    <title>Login Form with Nav Tabs using HTML and CSS - Coding Torque</title>
</head>

<body>
    <!-- Further code here -->


    <script 
        src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0lpha3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
        crossorigin="anonymous"></script>
</body>

</html>

Paste the below code in your <body> tag.

<div class="content">
    <!-- Nav pills -->
    <ul class="nav nav-pills" role="tablist">
        <li class="nav-item">
            <a class="nav-link active" data-toggle="pill" href="#login">Login</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" data-toggle="pill" href="#regis">Register</a>
        </li>
    </ul>

    <!-- Tab panes -->
    <div class="tab-content">
        <div id="login" class="container tab-pane active">
            <form>
                <div class="form-group">
                    <label for="exampleFormControlInput1">Email address</label>
                    <input type="email" class="form-control is-valid" id="exampleFormControlInput1"
                        placeholder="name@example.com">
                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone
                        else.</small>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">Password</label>
                    <input type="password" class="form-control is-invalid" id="exampleInputPassword1"
                        placeholder="Password">
                    <small id="emailHelp" class="form-text text-muted">Password incorrect.</small>
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
        <div id="regis" class="container tab-pane fade">
            <form>
                <div class="form-group">
                    <label for="InputName">Full Name</label>
                    <input type="text" class="form-control is-valid" id="InputName" placeholder="Full Name">
                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone
                        else.</small>
                </div>
                <div class="form-group">
                    <label for="InputUsername">Username</label>
                    <input type="text" class="form-control is-valid" id="InputUsername" placeholder="Username">
                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone
                        else.</small>
                </div>
                <div class="form-group">
                    <label for="exampleFormControlInput2">Email address</label>
                    <input type="email" class="form-control is-valid" id="exampleFormControlInput2"
                        placeholder="name@example.com">
                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone
                        else.</small>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword2">Password</label>
                    <input type="password" class="form-control is-invalid" id="exampleInputPassword2"
                        placeholder="Password">
                    <small id="emailHelp" class="form-text text-muted">Password incorrect.</small>
                </div>
                <div class="form-group">
                    <label for="exampleInputPasswordVer">Verify Password</label>
                    <input type="password" class="form-control is-invalid" id="exampleInputPasswordVer"
                        placeholder="Password">
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>
</div>

CSS Code 

Create a file style.css and paste the code below.

body {
  background: #16a085;
}
.content {
  width: 450px;
  height: auto;
  margin: 0 auto;
  padding: 30px;
}
.nav-pills {
  width: 450px;
}
.nav-item {
  width: 50%;
}
.nav-pills .nav-link {
  font-weight: bold;
  padding-top: 13px;
  text-align: center;
  background: #343436;
  color: #fff;
  border-radius: 30px;
  height: 100px;
}
.nav-pills .nav-link.active {
  background: #fff;
  color: #000;
}
.tab-content {
  position: absolute;
  width: 450px;
  height: auto;
  margin-top: -50px;
  background: #fff;
  color: #000;
  border-radius: 30px;
  z-index: 1000;
  box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.4);
  padding: 30px;
  margin-bottom: 50px;
}
.tab-content button {
  border-radius: 15px;
  width: 100px;
  margin: 0 auto;
  float: right;
}

Final Output

Login Form with Nav Tabs using HTML and CSS

Written by: Piyush Patil

Code Credits: @inupurnomo

If you found any mistakes or have any doubts please feel free to Contact Us

Hope you find this post helpful💖

Share your love
3D Modern House using HTML CSS and JavaScript
Previous Post 3D Modern House using HTML CSS and JavaScript
Next Post HTML MCQ Quiz | Set – 03
HTML MCQ Quiz set - 03
Recent Posts
  • Ying & Yang Cats with hover effect using HTML and CSS

    Ying & Yang Cats with hover effect using HTML and CSS

    11 months ago
  • Animated Button with Bird Effect using HTML and CSS

    Animated Button with Bird Effect using HTML and CSS

    11 months ago
  • Cubes with Hover Effects using HTML and CSS

    Cubes with Hover Effects using HTML and CSS

    11 months ago
  • X-Ray using HTML and CSS

    X-Ray using HTML and CSS

    11 months ago
  • Skillset icons with CSS Animation

    Skillset icons with CSS Animation

    11 months ago
Categories
Advance Algorithms API Projects App Development Backend Beginner Blockchain Development Bootstrap Card Designs Cheatsheets Coding CSS Games CSS Quiz Express JS Frontend Hero Section HTML & CSS HTML Quiz Intermediate Interview Questions JavaScript JavaScript Games JavaScript Quiz Login Forms MongoDB Navbars Next JS Node JS Products Programming Python Python Games Quizzes React React Quiz Reel Roadmaps SCSS TailwindCSS Toggle Buttons Uncategorized Web Design Web Development

Related Posts

Deploying a MERN App with Multiple Domain Names on VPS

  • Piyush Patil
  • February 13, 2025
  • HTML & CSS, API Projects, Backend, Express JS, Frontend, MongoDB, Next JS, React, Web Development

3D CSS Logo with Pure CSS

  • Piyush Patil
  • December 20, 2024
  • HTML & CSS

3D Santa using HTML and CSS Only

  • Piyush Patil
  • December 19, 2024
  • HTML & CSS
About Us

Coding Torque is a platform where we share amazing projects related Web development, App development, Software development, etc with Source Code.

Pages
  • About us
  • Contact Us
  • Privacy Policy
  • Quizzes
No results
Recent Posts
  • Crafting a Pure CSS 3D Breaking Bad Truck Scene

    Crafting a Pure CSS 3D Breaking Bad Truck Scene

    5 months ago
  • Creating a CSS 3D Chess Board with Pieces

    Creating a CSS 3D Chess Board with Pieces

    5 months ago

Copyright © 2025 - Coding Torque | Design by Piyush Patil