Web Designing Final

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

In jQuery, suppose there's a button with id = "moreParagraphs". Write a statement to insert a paragraph before the button. A) $("#moreParagraphs").add("<p>New paragraph</p>"); B) "<p>New paragraph.</p>".add("#moreParagraph"); C) $("#moreParagraphs").insert("<p>New paragraph</p>"); D) $("#moreParagraphs").before("<p>New paragraph</p>");

$("#moreParagraphs").before("<p>New paragraph</p>");

In 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");

$("h1").css("background-color", "red");

In jQuery, 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"}) D) You cannot define two CSS styles on one element in one statement.

$("h1").css({"background-color": "red", "text-align": "center"})

In jQuery, how do you make the <h1> element invisible? A) $("h1").invisable(2000); B) $("h1").visible(false); C) $("h1").invisible(true); D) $("h1").hide(2000);

$("h1").hide(2000);

In 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()

$("h1").siblings()

In jQuery, write a statement that removes all <p> elements. A) $("p").remove(); B) $("p").removeAll(); C) $("document").remove("p"); D) $("document").removeAll("p");

$("p").remove();

In 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)

(script src = "language.js")(/script)

Which of the following is a correct way to include JavaScript code in the HTML document? A) <javascript> //Insert your JavaScript code here; </javascript> B) <type = "text/JavaScript"> //Insert your JavaScript codes here; </type> C) <text/JavaScript> //Insert your JavaScript here; </text/JavaScript> D)(script) //Insert your JavaScript here; (/script)

(script) //Insert your JavaScript here; (/script)

Which of the following is a correct way for single line comments in JavaScript? A) <comment> this is JavaScript comment </comment> B) //this is JavaScript comment C) /this is JavaScript comment D) <!--this is JavaScript comment //-->

//this is JavaScript comment

How many times will the following JavaScript codes display "Hello World"? for (var i = 0; i <5; i++){alert("Hello World");} A) 0 B) 1 C) 4 D) 5

4

In 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> A) 2 B) 3 C) 4 D) 6

4

What is bootstrap? A) A front-end website framework B) Based on HTML, CSS, and JavaScript. C) Free and easy to use D) all of the above

All of the above

In jQuery, what does $("div").css("border", "solid 1px red"); do? A) The first <div> element will have a red border. B) The last <div> element will have a red border. C) All the <div> elements will have a red border. D) The element with the id = "div" will have a red border.

All the <div> elements will have a red border.

jQuery 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? A) jQuery can auto detect it B) the browser can auto detect it) You should use $("document").ready() D) You should minimize the number of H CTML elements to avoid such errors.

C

All JavaScript codes have to be inside the <head> element. True False

False

If you open an external JavaScript file in a text editor, most likely the first line of the codes is (script) tag. True False

False

In 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. True False

False

In order to apply Bootstrap to an HTML element, you must learn how to use CSS3. True False

False

Java is a short name for JavaScript. True False

False

jQuery is a JavaScript library runs on both browsers and Web servers. True False

False

jQuery uses the same selectors as CSS. True False

False

In JavaScript, suppose userAnswer is a variable. Which of the following is the correct way to compare if the userAnswer is 11? A) if userAnswer is 11 B) if userAnswer = 11 C) if userAnswer == 11 D) If (userAnswer == 11)

If (userAnswer == 11)

In JavaScript, how do you remove the decimal part of a number? A) Math.removedecimal(2.34); B) Math.nodecimal(2.34); C) Math.getint(2.34); D) Math.floor(2.34);

Math.floor(2.34);

What will the following HTML codes do? <input type = "text" pattern = "[A-F]"> A) The text field will accept only character A. B) The text field will accept only character F C) The text field will accept only character A, -, F. D) The text field will accept only character between A to F.

The text field will accept only character between A to F.

Which of the following statements about jQuery is true? A) jQuery library is included in all major browsers, such as Firefox, Edge, Chrome, and Safari. B) To use jQuery, you must download and install jQuery on the server. C) To use jQuery, you can add a link to your HTML documents that points to a CDN. D) When a new version of jQuery comes out, your link to CDN will be automatically be updated if you don't provide a version number in the link.

To use jQuery, you can add a link to your HTML documents that points to a CDN.

If you want the browser to communicate with the Web server by using JavaScript, you can use a technique called AJAX. True False

Triu

In order to apply Bootstrap to an HTML document, you must add necessary (link) and (script) elements to your HTML file and make sure your computer is connected to the internet. True False

True

In order to apply Bootstrap to an HTML element, the element must use a class attribute with the value pre-defined by the bootstrap. True False

True

JavaScript has a method called "addEventListener()" which can call a function when an event is fired. True False

True

Variable names in JavaScript is case sensitive. True False

True

jQuery is a JavaScript library that makes writing JavaScript codes easier. True False

True

What is the $ sign in jQuery? A) a shortcut for a function called jQuery. B) a symbol for the beginning of jQuery statements. C) a symbol that indicates that it is not a JavaScript statement. D) it does not mean anything.

a shortcut for a function called jQuery

Which of the following JavaScript codes will pop up a message box with words "It works!"? A) messagebox("It works"); B) msgbox("It works!"); C) alert("It works!"); D) alertbox("It works");

alert("It works!");

In jQuery, what does $("div.aboutMe") select? A) any element with the id = "aboutMe" B) only the <div> element with the id = "aboutMe" C) any element with the class = "aboutMe" D) only the <div> element with the class = "aboutMe"

any element with the class = "aboutMe"

In jQuery, what does $("div, .aboutMe") select? A) any element with the class = "aboutMe" B) all <div> elements C) both A and B D) none of the above.

both A and B

In Bootstrap grid system, what's the difference between a class value of col-sm-4 and col-lg-4? A) col-sm-4 are narrower than col-lg-4 columns B) col-sm-4 are smaller than col-lg-4 columns C) no difference in use on any size screen D) col-sm-4 will collapse the columns at narrower screen width than col-lg-4

col-sm-4 will collapse the columns at narrower screen width than col-lg-4

Bootstrap uses classes. Which class provides a responses fixed width for the (div) element? A) responsive B) container C) container-fixed D) container-fluid

container-fluid

Which of the following is a container in Bootstrap? A) container-fluid B) container-fixed C) container-full D) container-narrow

container-fluid

In JavaScript, which of the following is the correct way to call a function called displayEquation? A) function displayEquation() B) call displayEquation() C) function = displayEquation() D) displayEquation()

displayEquation()

How do you set the h1 element with id of "h" background color to red in JavaScript? A) document.h1.red; B) document.h1.style.red; C) document.getElementById("h").backgroundColor = "red"; D) document.getElementById("h").style.backgroundColor = "red";

document.getElementById("h").backgroundColor = "red";

Which is the JavaScript syntax to change the content of the HTML element <p> with an id of "myParagraph"? A) document.getElementById("my Paragraph") = "New paragraph."; B) document.getElementById ("p") = "New paragraph."; C) document.getElementById("my Paragraph").p = "New paragraph."; D) document.getElementById("my Paragraph").innerHTML = "New paragraph.";

document.getElementById("my Paragraph").innerHTML = "New paragraph.";

In JavaScript, which of the following is the correct way to create a function called displayEquation? A) function displayEquation() B) displayEquation() function C) function = displayEquation() D) displayEquation() = function

function displayEquation()

In JavaScript, which event occurs when the user clicks on an HTML element? A) onmouseclick B) onclick C) onhover D) onhtml

onclick

In jQuery, what does ("div#aboutMe") select? A) any element with the id = "aboutMe" B) only the <div> element with the id = "aboutMe" C) any element with the class = "aboutMe" D) only the <div> element with the class = "aboutMe"

only the <div> element with the id = "aboutMe"

In JavaScript, How do you declare an array called digits? A) var digits = array; B) array digits; C) var digits = []; D) array digits = [];

var digits = [];

How do you declare a variable in JavaScript? A) variable myVariableName; B) myVariableName variable; C) var myVariableName; D) var = myVariableName;

var myVariableName;

In 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? A) var randNum = Math.random(); B) Var ranNum = randum(); C) var randNum = random.Math(); D) var randNum = random(Math);

var randNum = Math.random();

In JavaScript, how do you separate words in a sentences into individual words and store them in an array. A) var words = sentence.split(" "); B) array words = sentence.split(" "); C) var[] words = sentence.split(" "); D) array[] words = sentence.split(" ");

var words = sentence.split(" ");

Which of the following is a JavaScript variable naming rule? A) variable names are not case sensitive B) variable names should start with a letter or an underscore C) variable names should include both letters and numbers D) variable names can include space

variable names should start with a letter or an underscore

Programming languages use __________ to store values in computer memory so that the values can be readily available to the programming instructions. A) variables B) special codes C) HTML D) JavaScript

variables


Ensembles d'études connexes

Chapter 3: "Customer Relationship Management Strategies"

View Set

Intro to Communications Final exam

View Set

Environmental; Science Chapter 5 Study Guide

View Set

OOP - Classes and Objects, and Constructors

View Set

Chapter 65: Management of Patients with Oncologic or Degenerative Neurologic Disorders (p. 2112 - 2120, 2133 - 2134)

View Set