Bootstrap challenges

Practice problem statements with input format, output format, constraints and solutions.

beginner

Bootstrap Introduction challenge

Build a small solution that uses Bootstrap Introduction in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Bootstrap Introduction</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core bootstrap introduction pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Bootstrap Introduction solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Bootstrap Setup challenge

Build a small solution that uses Bootstrap Setup in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Bootstrap Setup</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core bootstrap setup pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Bootstrap Setup solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Grid System Basics challenge

Build a small solution that uses Grid System Basics in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core grid system basics pattern before polishing the final output.

Solution

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>
beginner

Responsive Columns challenge

Build a small solution that uses Responsive Columns in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core responsive columns pattern before polishing the final output.

Solution

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>
beginner

Containers and Rows challenge

Build a small solution that uses Containers and Rows in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Containers and Rows</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core containers and rows pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Containers and Rows solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Typography and Colors challenge

Build a small solution that uses Typography and Colors in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core typography and colors pattern before polishing the final output.

Solution

<div className="container">
  <div className="row g-3">
    <div className="col-12 col-md-4"><div className="card p-3 shadow-sm border-0">Card 1</div></div>
  </div>
</div>
beginner

Buttons and Button Groups challenge

Build a small solution that uses Buttons and Button Groups in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Buttons and Button Groups</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core buttons and button groups pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Buttons and Button Groups solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Forms and Form Controls challenge

Build a small solution that uses Forms and Form Controls in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Forms and Form Controls</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core forms and form controls pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Forms and Form Controls solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Input Groups challenge

Build a small solution that uses Input Groups in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Input Groups</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core input groups pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Input Groups solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>
beginner

Alerts and Badges challenge

Build a small solution that uses Alerts and Badges in Bootstrap and handles one normal case plus one edge case.

Input format

Use a short text value, array, query, or sample object depending on the topic.

Output format

Print, render, or return the processed result in a readable format.

Constraints

  • Keep the solution under 60 lines.
  • Use descriptive names.
  • Do not depend on hidden external services.

Starter code

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Alerts and Badges</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>

Test cases

  • basic sample - valid processed result
  • empty or small sample - safe fallback result

Hint

Focus on the core alerts and badges pattern before polishing the final output.

Solution

<div className="card shadow-sm border-light rounded-3 p-4">
  <h2 className="card-title text-primary">Alerts and Badges solution</h2>
  <p className="card-text text-muted">Classic Bootstrap styled card layout.</p>
</div>