Back to Home Page Full Component

TTC Login Full page

#TTC Login Full page

Live preview

Source code

html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Technical Training Center (TTC)</title>
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
</head>
<body>
  <div class="container">
    <!-- Breadcrumb Section -->
    <section class="bg-light py-4 border-bottom">
      <div class="container">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb mb-0">
            <li class="breadcrumb-item"><a href="index.html" class="text-decoration-none">Home</a></li>
            <li class="breadcrumb-item active" aria-current="page">Portal Login</li>
          </ol>
        </nav>
      </div>
    </section>

    <!-- Login Section -->
    <section class="py-5">
      <div class="container">
        <div class="row g-5 align-items-center">
          <!-- Left Side: Login Form -->
          <div class="col-lg-5">
            <div class="card border-0 shadow-lg rounded-4 overflow-hidden">
              <div class="card-header bg-primary py-3">
                <h4 class="text-white text-center mb-0 fw-bold">User Login</h4>
              </div>
              <div class="card-body p-4 p-md-5">

                <!-- ii. Student/Teacher Login Selection -->
                <div class="btn-group w-100 mb-4" role="group">
                  <input type="radio" class="btn-check" name="loginType" id="studentLogin" checked>
                  <label class="btn btn-outline-primary py-2 fw-semibold" for="studentLogin">
                    <i class="bi bi-person-badge me-2"></i>Student
                  </label>

                  <input type="radio" class="btn-check" name="loginType" id="teacherLogin">
                  <label class="btn btn-outline-primary py-2 fw-semibold" for="teacherLogin">
                    <i class="bi bi-person-workspace me-2"></i>Teacher/Staff
                  </label>
                </div>

                <!-- iii. Login Form Section -->
                <form id="loginForm">
                  <div class="mb-3">
                    <label class="form-label fw-semibold">User Name / ID</label>
                    <div class="input-group">
                      <span class="input-group-text bg-light border-end-0"><i class="bi bi-person"></i></span>
                      <input type="text" class="form-control bg-light border-start-0" placeholder="Enter your ID" required>
                    </div>
                  </div>
                  <div class="mb-4">
                    <label class="form-label fw-semibold">Password</label>
                    <div class="input-group">
                      <span class="input-group-text bg-light border-end-0"><i class="bi bi-lock"></i></span>
                      <input type="password" class="form-control bg-light border-start-0" placeholder="••••••••" required>
                    </div>
                    <div class="text-end mt-2">
                      <a href="#" class="small text-decoration-none text-muted">Forgot password?</a>
                    </div>
                  </div>
                  <button type="submit" class="btn btn-primary w-100 py-2 fs-5 fw-bold rounded-pill shadow">
                    Login to Portal <i class="bi bi-box-arrow-in-right ms-2"></i>
                  </button>
                </form>

                <div class="mt-4 text-center">
                  <p class="small text-muted mb-0">Don't have an account? <a href="admission.html" class="fw-bold text-primary">Apply Now</a></p>
                </div>
              </div>
            </div>
          </div>

          <!-- Right Side: iv. Important Announcements Slider -->
          <div class="col-lg-7">
            <div class="px-lg-4">
              <h2 class="fw-bold mb-4">Portal News & <span class="text-primary">Alerts</span></h2>

              <div id="announcementSlider" class="carousel slide" data-bs-ride="carousel">
                <div class="carousel-inner">
                  <!-- Slide 1 -->
                  <div class="carousel-item active">
                    <div class="bg-light p-5 rounded-4 border-start border-5 border-primary">
                      <span class="badge bg-primary mb-3">Notice</span>
                      <h4 class="fw-bold">New Exam Portal features!</h4>
                      <p class="text-muted">Students can now download their admit cards directly from the dashboard after successful fee payment.</p>
                      <div class="d-flex align-items-center mt-4">
                        <i class="bi bi-clock text-primary me-2"></i>
                        <small class="fw-bold">Posted: 2 Hours ago</small>
                      </div>
                    </div>
                  </div>
                  <!-- Slide 2 -->
                  <div class="carousel-item">
                    <div class="bg-light p-5 rounded-4 border-start border-5 border-warning">
                      <span class="badge bg-warning text-dark mb-3">System Update</span>
                      <h4 class="fw-bold">Holiday Break Notice</h4>
                      <p class="text-muted">The student portal will undergo maintenance this Sunday from 2:00 AM to 4:00 AM. Access will be limited.</p>
                      <div class="d-flex align-items-center mt-4">
                        <i class="bi bi-clock text-warning me-2"></i>
                        <small class="fw-bold">Posted: Yesterday</small>
                      </div>
                    </div>
                  </div>
                </div>

                <!-- Slider Controls -->
                <div class="mt-4">
                  <button class="btn btn-white btn-sm shadow-sm rounded-circle me-2" type="button" data-bs-target="#announcementSlider" data-bs-slide="prev">
                    <i class="bi bi-arrow-left"></i>
                  </button>
                  <button class="btn btn-white btn-sm shadow-sm rounded-circle" type="button" data-bs-target="#announcementSlider" data-bs-slide="next">
                    <i class="bi bi-arrow-right"></i>
                  </button>
                </div>
              </div>

              <div class="mt-5">
                <div class="row g-4">
                  <div class="col-sm-6 text-center text-sm-start">
                    <div class="d-flex align-items-center">
                      <i class="bi bi-shield-lock fs-1 text-success me-3"></i>
                      <div>
                        <h6 class="mb-0 fw-bold">Secure Access</h6>
                        <small class="text-muted">Encrypted Data</small>
                      </div>
                    </div>
                  </div>
                  <div class="col-sm-6 text-center text-sm-start">
                    <div class="d-flex align-items-center">
                      <i class="bi bi-headset fs-1 text-info me-3"></i>
                      <div>
                        <h6 class="mb-0 fw-bold">Tech Support</h6>
                        <small class="text-muted">Available 24/7</small>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <style>
      .input-group-text {
        border-right: none;
      }

      .form-control:focus {
        border-color: #dee2e6;
        box-shadow: none;
        background-color: #fff !important;
      }

      .btn-check:checked+.btn-outline-primary {
        background-color: var(--bs-primary);
        color: white;
      }

    </style>


    <script src="js.js"></script>

  </div>

  <script src="js/bootstrap.bundle.min.js"></script>
</body>
</html>
How to use this component

Add it to your project in three steps

  1. Copy the HTML from the Source code tab above and paste it inside your <div class="container"> wrapper.
  2. Make sure the Bootstrap 5 CDN CSS and JS are linked in your <head> and before </body>. Any CodeShikhi component assumes Bootstrap 5.3+ is already loaded.
  3. Swap the placeholder text, links, and images for your own content — the layout, spacing, and responsive behaviour stay intact.

The TTC Login Full page block is fully responsive and works on every screen from 320 px phones to 1440 px+ desktops without additional CSS.

Accessibility checklist

Ship it accessible by default

  • Use semantic HTML landmarks — <header>, <nav>, <main>, <footer> — so screen readers can navigate your page.
  • Give every image an alt attribute (empty alt="" if it's decorative).
  • Label icon-only buttons with aria-label and keep focus outlines visible.
  • Maintain a contrast ratio of at least 4.5:1 for body text against its background.
  • Test the component with Tab / Shift+Tab and Enter — every interactive element should be reachable.
Step-by-step customisation

Make it match your brand

  1. Change the colour palette by overriding Bootstrap CSS variables: --bs-primary, --bs-body-bg.
  2. Adjust spacing with utility classes such as py-5, gap-4, and mt-lg-5 — no custom CSS required.
  3. Swap the typography by loading a Google Font in your <head> and setting --bs-body-font-family.
  4. Replace stock images with brand assets. Keep dimensions similar to avoid layout shift.
  5. Preview at multiple breakpoints (mobile, tablet, desktop) and tweak column spans if content wraps awkwardly.

Need the full theory? Read our Bootstrap 5 Technical Introduction Guide for grid, breakpoints, and Sass customisation in depth.

About the TTC Login Full page component

This component is part of the free CodeShikhi (কোড শিখি) Bootstrap 5 library — a growing collection of copy-paste website building blocks curated for learners and freelance developers. Every block is written in clean, semantic HTML with Bootstrap utility classes, keeps custom CSS to the minimum needed, and works without any build step. Use it as a starting point and adapt the markup, colours, and content to fit your project's brand and audience.

If you spot a bug, want a new variation, or would like to contribute an improvement, reach us via the contact page — we ship updates weekly based on community feedback.

Detailed Technical Breakdown

Detailed Technical Breakdown: TTC Login Full page

Browser compatibility & standards

The TTC Login Full page component is authored against Bootstrap 5.3, which drops legacy Internet Explorer support and targets modern evergreen engines — Chrome, Edge, Firefox, Safari, and all Chromium-based mobile browsers. Because the markup relies exclusively on the standard CSS features that ship with Bootstrap (Flexbox, CSS Grid, CSS custom properties, and the responsive breakpoint system), you can safely deploy this component to any browser released in the last five years without polyfills. If you need to support very old WebKit or Samsung Internet builds, load the standard Bootstrap 5 CSS from the official jsDelivr CDN — the bundled autoprefixer output already covers those vendor prefixes.

Performance impact

Performance-wise this block is intentionally light. The HTML payload for a typical Bootstrap component is under 4 KB gzipped, and it shares the same Bootstrap CSS/JS bundle you are already loading — meaning the marginal cost of adding it to a page is effectively zero KB on repeat visits. There is no JavaScript framework runtime, no hydration cost, and no client-side data fetching. The only images referenced are placeholders you will replace with your own assets; when you do, serve them as WebP or AVIF, add explicit width and height attributes to prevent layout shift (CLS), and lazy-load anything below the fold with loading="lazy". These small changes typically move Lighthouse Performance scores from the mid-80s into the 95+ range on both mobile and desktop.

Utility classes used

The component leans on Bootstrap's utility-first classes to stay declarative: spacing utilities (p-*, m-*, gap-*), the flex helpers (d-flex, align-items-*, justify-content-*), the grid system (container, row, col-lg-*), typography helpers (display-*, lead, text-*), and colour utilities that resolve to Bootstrap CSS variables such as --bs-primary, --bs-body-bg, and --bs-border-color. Because everything is expressed as utilities you can re-theme the entire component by overriding a handful of CSS variables at the :root level — no Sass recompile required.

Exact customisation steps

  1. Copy the source HTML from the tab above and paste it inside your <body>. The outer <div class="container"> wrapper is already included so the component sits on the Bootstrap grid.
  2. Replace the placeholder headings and paragraphs with your own copy. Keep heading levels in order (h1h2h3) so screen readers and search engines can parse the document outline.
  3. Swap any <img> tags for your brand assets. Match the original aspect ratio to avoid layout shift, and always fill in a meaningful alt attribute.
  4. Retune the palette by overriding CSS variables::root { --bs-primary: #4f46e5; --bs-body-bg: #ffffff; }. All utility colour classes update automatically.
  5. Test at each Bootstrap breakpoint — sm (576 px), md (768 px),lg (992 px), xl (1200 px), xxl (1400 px) — using your browser's device toolbar, and tweak column spans if long content wraps.
  6. Ship it with the standard Bootstrap 5 CDN in the <head> and the JS bundle before the closing </body>. No build step required.
Technical & Performance Integration Guide

Technical & Performance Integration Guide — TTC Login Full page (form)

When and why to use this form

Forms are where accessibility mistakes cost real money: every unlabelled field is a visitor who abandons the flow. Bootstrap's form controls already handle sizing, focus rings and validation states — your job is to wire up labels, describe errors and keep the tab order logical.

Accessibility & ARIA attributes

Every input needs a <label for="id"> — placeholders are not labels, they disappear on focus and are ignored by many screen readers. Group related radio buttons or checkboxes in a <fieldset> with a <legend>. Attach help text and error messages with aria-describedby, and set aria-invalid="true" on a field that failed validation so assistive technology announces the problem. Use type="email", type="tel" and inputmode to trigger the correct mobile keyboard, and mark required fields with the required attribute rather than only an asterisk.

Performance notes for this pattern

Client-side validation should be progressive: the form must still submit and validate on the server with JavaScript disabled. Bootstrap's .needs-validation pattern adds under 1 KB of script. Avoid loading a validation library and a date-picker bundle for a three-field contact form — native <input type="date"> is supported everywhere that matters and costs nothing.

Three customisation tricks

  • Use .form-floating for compact layouts that keep the label visible after typing.
  • Add .was-validated on submit to reveal all Bootstrap validation feedback at once.
  • Set autocomplete tokens (name, email, tel) so browsers can fill the form in one tap — a measurable conversion win on mobile.

Mistakes to avoid

  • Using placeholder text as the only label.
  • Disabling the submit button until the form is valid, which leaves keyboard users with no way to trigger error messages.

More designs in this section