A compilation of exercises on Bootstrap 5.

You can test your Bootstrap 5 skills with the exercises divided into sections below. Solve the exercises by filling in the missing code. You will receive 1 point for each correct answer.

You can test your Bootstrap 5 skills with the exercises divided into sections below. Solve the exercises by filling in the missing code. You will receive 1 point for each correct answer.

 

Containers in Bootstrap 5

Lesson 1: Add a Bootstrap class to the element to create a container with a compatible width:

Hello World!

Answer: container

Exercise 2: Add the Bootstrap class to the element to create a full-width container that spans the entire screen width:

Hello World!

Answer: container-fluid

Typography in Bootstrap 5

Exercise 1: Use Bootstrap classes to center the following text:

Hello World!

Answer: text-center

Lesson 2: Using display classes as elements

 

More prominent than a normal title (larger font size and thinner font thickness):

My Heading

 

Answer: display-1

Exercise 3: Use a Bootstrap class to capitalize the following text:

Hello World!

Answer: text-uppercase

Colors in Bootstrap 5

Lesson 1: Using contextual classes to color the text of an element.

switch to "orange":

Hello World!

Answer: text-warning

Lesson 2: Using contextual classes to set the background color of an element.

turned light gray:

Hello World!

Answer: bg-light

Images in Bootstrap 5

Lesson 1: Use a Bootstrap class to make an image a circle.

Chania

Answer: rounded-circle

Lesson 2: Use a Bootstrap class to add rounded corners to images.

Chania

Answer: rounded

Lesson 3: Using Bootstrap classes to arrange images as 'thumbnails'

Chania

Answer: img-thumbnail

Lesson 4: Using Bootstrap classes to create responsive images.

Chania

Answer: img-fluid

Tables in Bootstrap 5

Lesson 1: Add a class attribute to style the table in a basic Bootstrap table format:

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: class="table"

Exercise 2: Add zebra stripes to the correct positions in this table:

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

 

Answer:

John Doe

Exercise 3: Add a class that adds borders to all sides of the table and cells:

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: table-bordered

Lesson 4: Add a class to display the mouse cursor state on the rows in the table:

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: table-hover

Lesson 5: Use contextual classes to add the following colors to the rows:

  • The first row is green.
  • The second row is red.
  • The last row is blue.
John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: table-success/table-danger/table-primary (in order from top to bottom)

Alerts in Bootstrap 5

Exercise 1: Add a class 'alert' to display the result of a successful task.

 Success! 

Answer: alert alert-success

Exercise 2: Read the following code, then add the appropriate 'alert' class:

 This alert box could indicate a successful or positive action. This alert box could indicate a neutral informative change or action. This alert box could indicate a warning that might need attention. This alert box could indicate a dangerous or potentially negative action. 

 

Answer:

  • alert alert-success
  • alert alert-info
  • alert alert-warning
  • alert alert-danger

Lesson 3: Add appropriate Bootstrap classes to create closeable messages.

  Blah blah blah. 

Answer: alert-dismissible

Buttons in Bootstrap 5

Lesson 1: Add a Bootstrap class to style the button appropriately as a 'danger' button.

Answer: btn btn-danger

Exercise 2: Add a Bootstrap class to set the size of the first button to 'large' and the last button to 'small'.

 

Answer:

  • btn-lg
  • btn-sm

Image in BS5

Lesson 1:

Add the Bootstrap class to the element to create a responsive, fixed-width container:

Chania 


Answer: container

Lesson 2: Use a Bootstrap class to add rounded corners to images.

Chania

Answer: rounded

Lesson 3: Use a Bootstrap class to create images as thumbnails.

Chania

Answer: img-thumbnail

Lesson 4: Using Bootstrap classes to create responsive images

Chania

Answer: img-fluid

Tables in Bootstrap 5

Lesson 1: Add the `class` attribute to style a table as a basic Bootstrap table:

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: class="table"

Exercise 2: Add zebra stripes to the table.

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: table-striped

Exercise 3: Adding a class will add borders to all edges of the table and cells.

John Doe john@example.com
Mary Moe mary@example.com
July Dooley july@example.com

Answer: table-bordered

(To be continued)

Related posts
Other Program articles
  • Answering frequently asked questions about Bootstrap

    bootstrap là phương tiện phát triển web, ứng dụng phổ biến. nhằm giúp bạn hiểu rõ hơn, tipsmake.com.com sẽ tổng hợp và giải đáp những câu hỏi thường gặp về bootstrap.
  • Lesson 42: Large Grid in Bootstrap 5

    phần bài học bootstrap trước đã giới thiệu cho bạn những ví dụ về hệ thống lưới với các class cho thiết bị nhỏ và trung bình. Ở bài này, chúng ta sẽ tiếp tục tìm hiểu về lagre grid.
  • Lesson 41: Grid Medium in Bootstrap 5

    Ở bài học bootstrap 5 trước, bạn đã biết cách tạo grid với các class cho thiết bị màn hình nhỏ. thế nhưng trên thiết bị trung bình có thiết kế tốt hơn sẽ thường được chia theo 50%/50%.
  • Lesson 40: Small Grid in Bootstrap 5

    tiếp tục bài học về grid trong bootstrap 5, chúng ta sẽ tìm hiểu cách làm lưới grid nhỏ đơn giản nhất. về cơ bản, cách tạo grid nhỏ bằng bootstrap 5 không khó.
  • Lesson 39: Ultra-Small Grid Styles in Bootstrap 5

    Ở những bài học bootstrap 5 trước, chúng ta đã tìm hiểu về những kiểu hệ thống lưới grid cơ bản. Ở bài này, hãy cùng download.vn đi sâu hơn vào những kiểu grid cực nhỏ nhé!
  • Lesson 38: Grid Systems from Stacked to Horizontal in Bootstrap 5

    hệ thống grid trong bootstrap 5 khá đa dạng. Ở bài học này, chúng ta sẽ tập trung vào hai cách sắp xếp grid thông dụng nhất nhé!
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup