Quiz
Final Exam: Bootstrap, JavaScript, JQuery
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (45)
1What is Bootstrap?
- AA front-end website framework
- BBased on HTML, CSS, and JavaScript
- CFree and easy to use
- Dall of the above
2In order to apply Bootstrap to an HTML element, the element must use a class attribute with the value pre-defined by the Bootstrap.
- ATrue
- BFalse
3In order to apply Bootstrap to an HTML element, you must first learn how to use CSS3.
- ATrue
- BFalse
4In order to apply Bootstrap to an HTML element, you must first download all necessary files to your local computer and provide a CSS link to that folder and files.
- ATrue
- BFalse
5In order to apply Bootstrap to an HTML document, you just add necessary <links> and <script> elements to your HTML file and make sure your computer is connected to the internet.
- ATrue
- BFalse
6Which of the following is a container in Bootstrap?
- Acontainer-fluid
- Bcontainer-fixed
- Ccontainer-full
- Dcontainer-narrow
7Bootstrap uses classes. Which class provides a responsive fixed width for the <div> element?
- Aresponsive
- Bcontainer
- Ccontainer-fixed
- Dcontainer-fluid
8In Bootstrap, if you see the following line, how many columns does the page designer plan to have assuming all columns are equal width?
<div class="col-sm-4">My first column</div>- A2
- B3
- C4
- D6
9In Bootstrap grid system, what's the difference between a class value of col-sm-4 and col-lg-4?
- Acol-sm4 columns are narrower than col-lg-4-columns
- Bcol-sm-4 columns are smaller than col-lg-4 columns
- Cno difference in use on any size screen
- Dcol-sm-4 will collapse the columns at narrower screen width than col-lg-4
10Which of the following is a correct wa to include JavaScript code in an HTML document?
- A<javascript>
//Insert your JavaScript codes here;
</javascript> - B<type="text/JavaScript">
//Insert your JavaScript codes here;
</type> - C<text/JavaScript>
//Insert your JavaScript codes here;
</text/JavaScript> - D<script>
//Insert your JavaScript codes here;
</script>
- A<javascript>
11Which is the JavaScript syntax to change the content of the HTML element <p> with an id of "myParagraph"?
- Adocument.getElementById("myParagraph") = "New paragraph.";
- Bdocument.getElementById("p") = "New paragraph.";
- Cdocument.getElementById("myParagraph").p = "New paragraph.";
- Ddocument.getElementById("myParagraph").innerHTML = "New paragraph.";
12Java is short name for JavaScript
- ATrue
- BFalse
13In JavaScript, which event occurs when the user clicks on an HTML element?
- Aonmouseclick
- Bonclick
- Conhover
- Donhtml
14Which of the following JavaScript codes will pop up a message box with words "it works!"?
- Amessagebox("it works!");
- Bmsgbox("it works!");
- Calert("it works!");
- Dalertbox("itworks!");
15Which of the following is a correct way for single line comments in JavaScript?
- A<comment>this is a JavaScript comment</comment>
- B//this is a JavaScript comment
- C/comment
- D<!--this is JavaScript comment//-->
16How do you declare a variable in JavaScript?
- Avariable myVariableName;
- BmyVariableName variable;
- Cvar myVariableName;
- Dvar=myVariableName;
17Programming languages use ______ to store values in computer memory so that the values can be readily available to the programming instructions.
- Avariables
- Bspecial codes
- CHTML
- DJavaScript
18Which of the following is a JavaScript variable naming rule?
- Avariable names are not case sensitive
- Bvariable names should start with a letter or an underscore
- Cvariable names should include both letters and numbers
- Dvariable names can include space
19In JavaScript, suppose userAnswer is a variable. Which of the following is the correct way to compare if the userAnswer is 11?
- Aif userAnswer is 11
- Bif userAnswer = 11
- Cif userAnswer == 11
- Dif (userAnswer == 11)
20Variable names in JavaScript is case sensitive.
- ATrue
- BFalse
21In JavaScript, you can use the Math object's random method to generate a random number between 0 and 1. Which of the following is the correct way to store the random number in a variable called randNum?
- Avar randNum = Math.random();
- Bvar randNum = random();
- Cvar randNum = random.Math();
- Dvar randNum = random(Math);
22In JavaScript, how do you remove the decimal part of a number?
- AMath.removedecimal(2.34);
- BMath.nodecimal(2.34)
- CMath.geint(2.34);
- DMath.floor(2.34);
23How do you set the h1element with id of "h" background color to red in JavaScript?
- Adocument.h1.red;
- Bdocument.h1.style.red;
- Cdocument.getElementbyId("h").backgroundColor = "red"';
- Ddocument.getElementbyId("h").style.backgroundColor = "red"';
24In JavaScript, which of the following is the correct way to create a function called displayEquation?
- Afunction displayEquation()
- BdisplayEquation()function
- Cfunction = displayEquation()
- DdisplayEquation() = function
25JavaScript has a method called "addEventListener()" which can call a function when an event is fired.
- ATrue
- BFalse
26How many times will the following JavaScript codes display "Hello World"?
for (var i = 0; i , 5; i++){alert("Hello World");}- A0
- B1
- C4
- D5
27In JavaScript, ho do you declare an array called digits?
- Avar digits = array;
- Barray digits;
- Cvar digits = [ ];
- Darray digits = [ ];
28In JavaScript, how do you separate words in a sentence into individual words and store them in an array?
- Avar words = sentence.split(" ");
- Barray words = sentence.split(" ");
- Cvar [ ] words = sentence.split(" ");
- Darray [ ] words = sentence.split(" ");
29All JavaScript codes have to be inside the <head> element.
- ATrue
- BFalse
30In an HTML file, how do you refer to an external JavaScript file called language.js?
- A<script href = "language.js"></script>
- B<script name = "language.js"></script>
- C<script src = "language.js"></script>
- D<script>language.js</script>
31If you open an external JavaScript file in a text editor, most likely the first line of the codes is <script> tag.
- ATrue
- BFalse
32What will the following HTML codes do?
<input type = "text" pattern = "[A-F]'>- AThe text field will accept only character A
- BThe text field will accept only character F
- CThe text field will accept only character A, -, or F
- DThe text field will accept only one character between A to F
33jQuery is a JavaScript library that makes writing JavaScript codes easier
- ATrue
- BFalse
34jQuery is a JavaScript library that runs on both browsers and Web servers
- ATrue
- BFalse
35What is the $ sign in jQuery?
- Aa shortcut for a function called jQuery
- Ba symbol for the beginning of jQuery statement
- Ca symbol that indicates that it is not a JavaScript statement
- DIt does not mean anything
36Which of the following statements about jQuery is true?
- AjQuery library is included in all major browsers such as Firfox, Edge, Chrome, and Safari,
- BTo use jQuery, you must download and install jQuery on the srever
- CTo use jQuery, you can add a link to your HTML document that points to a CDN
- DWhen a new version of jQuery comes out, your link to CDN will be automatically updated if you don't provide a version number in the link
37jQuery works on the elements on the page. If an element is not loaded yet and when jQuery works on it, an error will occur. How does jQuery make sure this won't happen?
- AjQuery can auto detect it
- Bthe browser can auto detect it
- CYou should use $("document").ready()
- DYou should minimize the number of HTML elements to avoid such errors
38jQuery uses the same selectors as CSS
- ATrue
- BFalse
39In jQuery, what does $("div").css("border", "solid 1px red"); do?
- AThe first <div> element will have a red border
- BThe last <div> element will have a red border
- CAll the <div> elements will have a red border
- DThe element with the id = "div" will have a red border
40In jQuery, if you want to make all elements on the same level as <h1> to have certain properties, which selector should you use?
- A$("h1").samelevel()
- B$("h1").peer()
- C$("h1").same()
- D$("h1").siblings()
41In jQuery, what does $("div.aboutMe") select?
- Aany element with the id = "aboutMe"
- Bonly the <div> element with the id = "aboutMe"
- Cany element with the class = "aboutMe"
- Donly the <div> element with the class = "aboutMe"
42In jQuery what does $("div#aboutMe") select?
- Aany element with the id = "aboutMe"
- Bonly the <div> element with the id = "aboutMe"
- Cany element with the class = "aboutMe"
- Donly the <div> element with the class = "aboutMe"
43In jQuery what does $("div, .aboutMe")select?
- Aany element with the class = "aboutMe"
- Ball <div> elements
- Cboth A) and B)
- Dnone of the above
44in jQuery, what are the codes for setting all <h1> element backgrounds red?
- A$("h1").background-color("red");
- B$("h1").css("background-color", "red");
- C$("h1").style("background-color", "red");
- D$("h1").setcss("background-color", "red");
45In jQuer, what are the codes for setting all <h1> element backgrounds red and text centered?
- A$("h1").css("red", "center");
- B$("h1").css("background-color", "red"; "text-align", "center");
- C$("h1").css({"background-color": "red", "text-align": "center"});
- DYou cannot define two CSS styles on one element in one statement
Information
- Description
- Quiz on Final Exam: Bootstrap, JavaScript, JQuery, created by Rebecca Walton on 28/02/2020.
- Author
- Rebecca Walton
- Language
- English
- Views
- 3
- Tags
- Rating
- No ratings yet Rate this quiz