🌐 Web Development

Bootstrap

Bootstrap CSS

The most popular CSS framework. Provides a responsive grid and components. Fast UI development.

πŸ“– Detailed Explanation

Bootstrap is the world's most popular open-source CSS framework, developed at Twitter. It was created in 2011 by Mark Otto and Jacob Thornton for UI consistency across internal tools, and after its release it gained explosive popularity and became a standard tool for front-end development. It has more than 160,000 stars on GitHub.

The core of Bootstrap is its 12-column grid system and predefined UI components. It provides almost every component a web application needs, including buttons, forms, cards, modals, navigation, and alerts. With responsive utility classes, the layout adjusts automatically on mobile, tablet, and desktop.

Bootstrap 5 (released in 2021) removed the jQuery dependency and introduced CSS custom properties (variables). Colors, fonts, spacing, and more can be easily customized through Sass variables, and unused styles are removed with PurgeCSS to optimize the bundle size.

In practice, Bootstrap is widely used for rapid prototyping, admin dashboards, and internal tool development. It is useful for quickly building a consistent UI in projects that have no design system. However, utility-first frameworks such as Tailwind CSS have been gaining popularity lately, so choose according to the characteristics of the project.

πŸ’» Code Example

<!-- Bootstrap 5 λ°˜μ‘ν˜• λ ˆμ΄μ•„μ›ƒ 예제 -->
<!DOCTYPE html>
<html>
<head>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<!-- λ°˜μ‘ν˜• λ„€λΉ„κ²Œμ΄μ…˜ -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
  <div class="container">
    <a class="navbar-brand" href="#">My App</a>
    <button class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#nav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="nav">
      <ul class="navbar-nav ms-auto">
        <li class="nav-item"><a class="nav-link active" href="#">Home</a></li>
        <li class="nav-item"><a class="nav-link" href="#">About</a></li>
      </ul>
    </div>
  </div>
</nav>

<!-- 12컬럼 κ·Έλ¦¬λ“œ μ‹œμŠ€ν…œ -->
<div class="container mt-4">
  <div class="row">
    <!-- λͺ¨λ°”일: 12μΉΈ, νƒœλΈ”λ¦Ώ: 6μΉΈ, λ°μŠ€ν¬ν†±: 4μΉΈ -->
    <div class="col-12 col-md-6 col-lg-4">
      <div class="card">
        <div class="card-body">
          <h5 class="card-title">Card 1</h5>
          <p class="card-text">Some quick example text.</p>
          <button class="btn btn-primary">Go somewhere</button>
        </div>
      </div>
    </div>
  </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

πŸ—£οΈ Say It Like This in Practice

πŸ’¬ In a Meeting
"This admin page has to be done without design resources, so I'd like us to build it quickly with Bootstrap. Combining just the basic components is clean enough, and responsive support comes automatically too."
πŸ’¬ In an Interview
"Bootstrap is a CSS framework based on a 12-column grid. You specify the layout for each breakpoint with classes like col-md-6, and it provides components such as buttons, modals, and alerts, so you can develop UIs quickly. The latest version has no jQuery dependency."
πŸ’¬ In a code review
"Don't overuse !important here; override Bootstrap's Sass variables instead. If you change the $primary color in _variables.scss, the whole theme changes consistently."

Take a mock interview on this topic β†’ WIA SOOM AI Interview Β· Start for free

⚠️ Common Mistakes & Cautions

❌
Load the entire CSS from a CDN

Import only the components you need, or remove unused styles with PurgeCSS. The full bundle is over 150KB.

❌
Overriding CSS directly

Overusing !important makes maintenance difficult. Customize through Sass variables instead.

βœ…
The right pattern

Install it via npm, import only the components you need, and customize the theme with Sass variables. For React projects, consider react-bootstrap.

πŸ”— Related Terms

πŸ“š Learn More