Home > Articles > Programming

  • Print
  • + Share This
This chapter is from the book

Workshop

The workshop contains quiz questions to help you process what you’ve learned in this hour. Try to answer all the questions before you read the answers.

Q&A

  • Q. I’m worried that if I use Bootstrap, my web pages will look like every other Bootstrap site. How do I prevent this?

    A. If you stick with the Bootstrap template or theme, then yes, you might risk creating a page that looks like a lot of other Bootstrap sites. But you can add your own styles to modify your website to look how you want. You will learn more about this in Hour 21, “Customizing Bootstrap and Your Bootstrap Website.”

  • Q. Is Bootstrap responsive?

    A. Bootstrap automatically uses responsive web design (RWD) to adjust the pages for various screen sizes. This is covered in more detail in Hour 5, “Grids and How to Use Them.”

  • Q. What is the benefit of the Bootstrap Theme over the basic Bootstrap CSS?

    A. The Bootstrap Theme uses the bootstrap-theme.css file to get what Bootstrap calls a “visually enhanced experience.” However, in my experience, most of the colors and visual enhancements are already included in the bootstrap.css file, so you don’t need this second theme CSS file. I never use it in my designs.

Quiz

  1. What is the least amount of code you need to add Bootstrap to a web page?

    1. The Bootstrap CSS file
    2. The Bootstrap CSS and JavaScript files
    3. The Bootstrap CSS and JavaScript files and jQuery
    4. The Bootstrap CSS and JavaScript files, jQuery, and your custom CSS
    5. The Bootstrap CSS and JavaScript files, jQuery, and your custom CSS and JavaScript
  2. True or False: Bootstrap is not HTML5.
  3. True or False: Bootstrap plugins require jQuery.
  4. True or False: You must use the Bootstrap template to be compliant with Bootstrap.
  5. Why is the <meta charset="utf-8"> line so important?

    1. Because without it, the characters won’t display.
    2. Because it tells browsers the page is internationally ready.
    3. Because without it, your page is vulnerable to certain hacker exploits.
    4. It’s not important.
  6. True or False: The X-UA-Compatible line is what makes the Bootstrap framework work in Internet Explorer.
  7. True or False: The viewport meta tag is what makes Bootstrap responsive.
  8. What does the code <!--[if lt IE 9]> do?

    1. Nothing, it’s in a comment.
    2. It activates the following code in Internet Explorer 8 and lower.
    3. It activates the following code in Internet Explorer 9 and lower.
    4. It activates the following code in any version of Internet Explorer.
  9. Where is the best location for the Bootstrap JavaScript file?

    1. In the <head> of the document
    2. Anywhere in the <body> of the document that you need scripting
    3. Just above the </body> tag, but before the jQuery script
    4. Just above the </body> tag, but after the jQuery script
  10. True or False: The bootstrap-theme.css file is the only way to get the Bootstrap colors and visual enhancements.

Quiz Answers

  1. a. The minimum you need to add Bootstrap to a web page is the Bootstrap CSS file.
  2. False. Bootstrap uses the <!doctype html> doctype, which indicates that it is HTML5.
  3. True. Bootstrap JavaScript plugins require jQuery to work.
  4. False. As long as you use the Bootstrap CSS and JavaScript files, you are using Bootstrap.
  5. c. Without the <meta charset="utf-8"> line in the <head> of your document, the web page becomes vulnerable to certain hacker exploits.
  6. False. The X-UA-Compatible line helps Internet Explorer work more effectively, but it is not required to get Bootstrap to work in that browser.
  7. False. The viewport meta tag helps the design look better in smaller screens, but it is not required for a responsive design.
  8. b. The line <!--[if lt IE 9]> is a conditional comment that activates the following HTML in versions of Internet Explorer lower than 9.
  9. d. The best place for the Bootstrap JavaScript file is the very last place in the HTML, just above the </body> tag, after the jQuery script.
  10. False. The Bootstrap Theme CSS file ensures that you have all the colors and visual customizations, but they are typically included in the standard Bootstrap CSS file by default.

Exercises

  1. Convert a web page you already have to Bootstrap using the instructions in this hour. Compare the new page to the old one in a web browser.
  2. Create a brand-new page using the Bootstrap standard template.
  • + Share This
  • 🔖 Save To Your Account