InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How would you implement a carousel in bootstrap? |
|
Answer» Here is an example with a detailed explanation: <div id="myCarousel" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ul class="carousel-indicators"> <li data-target="#myCarousel" data-slide-to="0" class="active"></li> <li data-target="#myCarousel" data-slide-to="1"></li> <li data-target="#myCarousel" data-slide-to="2"></li> </ul> <!-- Wrapper --> <div class="carousel-inner"> <div class="carousel-item active"> <img src="ap.jpg" alt="Apple"> <div class="carousel-caption"> <h3>APPLE</h3> </div> </div> <div class="carousel-item"> <img src="or.jpg" alt="Orange"> <div class="carousel-caption"> <h3>ORANGE</h3> </div> </div> <div class="carousel-item"> <img src="kw.jpg" alt="Kiwi"> <div class="carousel-caption"> <h3>KIWI</h3> </div> </div> </div> <!-- Left and Right Controls --> <a class="carousel-control-prev" href="#myCarousel" data-slide="prev"> <span class="carousel-control-prev-icon"></span> </a> <a class="carousel-control-next" href="#myCarousel" data-slide="next"> <span class="carousel-control-next-icon"></span> </a></div>The outermost <div> is as follows:
The section on "Indicators" is as follows:
The "Wrapper" section is as follows:
The section on "Left and Right Controls" is as follows:
|
|
| 2. |
What is the media object in Bootstrap and what are their types? |
|
Answer» Bootstrap's media objects allow you to position media objects such as images, videos, and AUDIO to the left or RIGHT of content blocks. Media elements can be constructed using the class .media and the SOURCE is specified by using the class .media-object. There are two TYPES of media objects:
|
|
| 3. |
Write the HTML code to create a basic toast. |
|
Answer» When something happens, the TOAST COMPONENT acts as an alert box that only appears for a few seconds (i.e. when the user clicks on a button, SUBMITS a FORM, etc.). <div class= "toast" > <div class= "toast-header" > Toast Header </div> <div class="toast-body"> Toast Body Text </div></div> |
|
| 4. |
Discuss Bootstrap table and various classes that can change the appearance of the table. |
Answer»
Here is how the zebra-striped table LOOKS like: |
|
| 5. |
Explain input groups in Bootstrap. |
|
Answer» The .input-group class is a CONTAINER for enhancing an input by adding a "HELP TEXT" icon, text, or button in front or BEHIND the input field. To ADD the help text in front of the input, use .input-group-prepend, and to add it behind the input, use .input-group-append. Finally, style the provided help text with the .input-group-text class. |
|
| 6. |
What are the two types of spinners that you can create using Bootstrap? |
|
Answer» Use the .spinner-border class to MAKE a spinner/loader. <div class= "spinner-border" ></div>If you want the spinner/loader to grow INSTEAD of "spin", use the .spinner-grow class. <div class= "spinner-grow" ></div> |
|
| 7. |
What is a bootstrap card and how would you create one? |
|
Answer» In Bootstrap 4, a card is a bordered box with padding surrounding its content. It has options for HEADERS, footers, content, and colors, among other things. <DIV class="card"> <div class="card-header">Header</div> <div class="card-body">Body</div> <div class="card-footer">Footer</div></div>Another example: <div class="card" STYLE="width:400px"> <img class="card-img-top" src="img_avatar.png" alt="Card image"> <div class="card-body"> <h4 class="card-title">RICHARD Taylor</h4> <p class="card-text">Some example text.</p> <a href="#" class="btn btn-primary">See Profile</a> </div></div>
|
|
| 8. |
How can one create an alert in Bootstrap? |
|
Answer» Create a wrapper <div> and add a class of .alert and ONE of the CONTEXTUAL classes to create a basic alert (e.g., .alert-success, .alert-info, .alert-warning, .alert-danger, .alert-primary, .alert-secondary, .alert-light or .alert-dark). |
|
| 9. |
What contextual classes can be used to style the panels? |
|
Answer» To MAKE a PANEL more meaningful to a SPECIFIC CONTEXT, use contextual state CLASSES like panel-primary, panel-success, panel-info, panel-warning, and panel-danger. |
|
| 10. |
In Bootstrap, how do you make navigation elements? |
|
Answer» The NAVIGATION elements in BOOTSTRAP can be styled in a variety of ways. The markup and base CLASS are the same in all of these .nav. To build tabular navigation or TABS, execute the following steps: Begin by creating an unordered LIST using the base class of .nav. The .nav-tabs class should be added. |
|
| 11. |
In Bootstrap 4, what is flexbox? |
|
Answer» Flexbox is a layout module for FLEXIBLE boxes. WITHOUT USING float or POSITIONING, you can quickly create a flexible layout design with flexbox. |
|
| 12. |
What is a lead? |
|
Answer» <P>Lead adds some emphasis to a paragraph. The .lead class is used to achieve this and it makes the font larger, TALLER, and LIGHTER in weight. <p class= "lead" > Paragraph </p> |
|
| 13. |
In Bootstrap, what are the two codes for displaying code? |
|
Answer» In Bootstrap, there are two straightforward ways to display code: |
|
| 14. |
How can you use Bootstrap to make thumbnails? |
|
Answer» To make thumbnails with BOOTSTRAP, go through the STEPS below: Wrap an image in an <a> tag with the class .thumbnail. It will add a grey border and FOUR pixels of PADDING. An animated light will now outline the image when it has HOVERED over. |
|
| 15. |
What is a breadcrumb in Bootstrap? |
|
Answer» BREADCRUMBS are a wonderful WAY to display a site's hierarchy-based information. Breadcrumbs can show the dates of publication, categories, and tags in the case of BLOGS. They show where the current page is in the navigational hierarchy. In Bootstrap, a breadcrumb is essentially an unordered list with the class .breadcrumb. CSS adds the separator for you automatically. |
|
| 16. |
What is a Button Group, and what is the class for a basic Button Group? |
|
Answer» Multiple buttons can be placed together on a SINGLE line using button groups. You can USE this to GROUP objects together, such as alignment buttons. The .btn-group CLASS is used for basic button groups. You can use the class .btn to WRAP a set of buttons in .btn-group. |
|
| 17. |
What is the difference between Bootstrap 3 and Bootstrap 4 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Answer»
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18. |
What is the difference between Bootstrap 4 and Bootstrap 5 |
|||||||||||||||||||||||||||||||||||||||
Answer»
|
||||||||||||||||||||||||||||||||||||||||
| 19. |
What do you know about the Bootstrap Grid System? |
|
Answer» The Bootstrap Grid System is a mobile-first, responsive grid system that scales up to 12 columns as the device or VIEWPORT size grows. Predefined classes for quick layout options and POWERFUL mix-ins for creating SUCCESSFUL semantic layouts are included in the system. There are five classes in the Bootstrap 4 grid system:
The classes listed above can be combined to build layouts that are more dynamic and adaptable. |
|
| 20. |
What are the default Bootstrap text settings? |
|
Answer» <P>The default font size in Bootstrap 4 is 16px, with a line-height of 1.5. The default font family is "Helvetica Neue," which includes Helvetica, Arial, and other sans-serif fonts. Margin-top: 0 and margin-bottom: 1rem are also set on all <p> elements (16px by default). |
|
| 21. |
What is a Bootstrap Container, and how does it work? |
|
Answer» A bootstrap container is a handy CLASS that GENERATES a central region on the page where we can put our site content. The bootstrap .container has the advantage of being responsive and containing all of our other HTML code. Containers are USED to pad the content within them, and there are two types of containers: |
|
| 22. |
What are the advantages of Bootstrap? |
|
Answer» The following are some advantages of Bootstrap:
|
|