Bootstrap Flashcards

(25 cards)

1
Q

What is Bootstrap, and why is it used?

A

1-Bootstrap is a popular front-end framework that helps developers build responsive and mobile-first websites quickly.
2-It provides a collection of pre-designed CSS styles, JavaScript components, and grid systems to simplify web development.
3-It is widely used for its ease of use, consistency, and responsiveness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you create a responsive grid layout in Bootstrap?

A

Bootstrap uses a 12-column grid system to create responsive layouts. You can define columns using .col-, .col-sm-, .col-md-, .col-lg-, and .col-xl-, depending on the screen size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are Bootstrap containers, and how are they used?

A

1-A container in Bootstrap is used to wrap content and provide responsive padding.
2-.container → Fixed-width container that adapts to screen size.
.container-fluid → Full-width container spanning the entire viewport.
.container-{breakpoint} → Fixed-width container that changes at a specific breakpoint (e.g., .container-md).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to link Boostrap to your projct?

A

1-by either using <link></link>
2- npm i bootstrap@5.3.3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Bootstrap spacing utilities, and how do they work?

A

Bootstrap provides spacing utilities for margin (m-) and padding (p-). These utilities help control spacing in a consistent way using a predefined scale (0 to 5).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the syntax of spacing utilities?

A

{property}{sides}-{size}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Talk about space sizing in Padding and Margin

A

{size}: 0 (none), 1 (small), 2 (medium), 3 (large), 4, 5 (largest)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does Bootstrap handle colors?

A

Bootstrap provides a set of color utility classes for text, backgrounds, and borders. These classes help you quickly apply colors without writing custom CSS.

Text Colors: text-{color}
Background Colors: bg-{color}
Border Colors: border-{color}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the Default Color Patterns:

A

primary (Blue)
secondary (Gray)
success (Green)
danger (Red)
warning (Yellow)
info (Cyan)
light (Light Gray)
dark (Blackish Gray)
white (Pure White)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What do you do when you don’t have the color you want?

A

Either use external CSS or use inline CSS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you change text size in Bootstrap?

A

Bootstrap provides text size utilities using fs-{size} where {size} is a number from 1 to 6 (1 is largest , 6 is smalles)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you make text bold, italic, or muted in Bootstrap?

A

fw-bold → Bold text
fw-semibold → Semi-bold text
fw-light → Light-weight text
fst-italic → Italic text
text-muted → Light gray text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you enable Flexbox in Bootstrap?

A

d-flex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you change the flex direction in Bootstrap?

A

Use the flex-{direction} class to control direction:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you justify content in Bootstrap Flexbox?

A

justify-content-{value} to align items horizontally:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you align items using Bootstrap Flexbox?

A

Use align-items-{value} to control vertical alignment:

17
Q

Can you use -sm, -md, -lg, and -xl with Bootstrap Flexbox?

A

d-{breakpoint}-flex
flex-{breakpoint}-row / flex-{breakpoint}-column
justify-content-{breakpoint}-{value}
align-items-{breakpoint}-{value}

18
Q

How do you control height and width in Bootstrap?

A

Bootstrap provides height (h-) and width (w-) utility classes to quickly set element dimensions using percentages.

Width (w-{value})
Height (h-{value})
25-100 and auto
These are for the container

19
Q

How do you make an element take full screen width and height in Bootstrap?

A

vh-100 → 100% of the viewport height
vw-100 → 100% of the viewport width

20
Q

How do you add borders to an element in Bootstrap?

A

border → Adds a 1px solid border
border-0 → Removes borders
border-top → Adds a border to the top
border-bottom → Adds a border to the bottom
border-start → Adds a border to the left (LTR)
border-end → Adds a border to the right (LTR)

21
Q

How do you change the border width in Bootstrap?

A

Use border-{size} to adjust border thickness.

border-1 → Thin border
border-2 → Medium border
border-3 → Thick border
border-4 → Extra thick border
border-5 → Very thick border

22
Q

How do you make rounded borders in Bootstrap?

A

Use rounded-{size} to apply border radius.

rounded-0 → No rounding
rounded-1 → Small rounding
rounded-2 → Medium rounding
rounded-3 → Large rounding
rounded-circle → Fully circular border
rounded-pill → Pill-shaped border

23
Q

How do you control border opacity in Bootstrap?

A

Available Border Opacity Classes:

border-opacity-10 → 10% opacity
border-opacity-25 → 25% opacity
border-opacity-50 → 50% opacity
border-opacity-75 → 75% opacity
border-opacity-100 → 100% opacity (default)

24
Q

How do you make images responsive in Bootstrap?

A

Bootstrap provides the img-fluid class to make images responsive.

It sets max-width: 100% and height: auto, so the image scales within its container.

25