LIS2360 Exam 2

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

A website should use an external stylesheet to create styles that apply to all web pages.

true

Cascading is the process of combining multiple style rules and resolving conflicts between those rules.

true

The _______________ is a data structure that represents all parts of an HTML document. JavaScript uses this to make web pages interactive.

Document Object Model (DOM)

Which represents JavaScript comments?

// and /star star/

What is the result of the following statement? x = 0; if (x > 10) { x = 1; }

0

What numbers will print as output by the following code segment? for ( var x = 1; x < 5; x++) { document.writeln( x ); }

1 2 3 4

What will the following code segment display as output? var a = 13; var b = 7; var x; if (!(a > 10 && b > 0)) { x = 8; } else { x = 10; } document.writeln(x);

10

What is the result of the following statement? (5 + 3) % 3 = _______

2

When describing the padding and margin properties for box sizing, what does the following represent? margin: 20px 15px;

20px top and bottom and 15px right and left margins.

The W3C standards committees have defined a standard meaning of HTML, CSS, and JavaScript. Browsers may implement these standards differently for multiple reasons. Which of the following represents why browsers are implemented differently? - A browser vendor was helping the W3C committee develop the standard API and may have started with a different proposed implementation than the final implementation. Typically, future versions of the browser will implement the final specification, but older versions may support the initial implementation. - A browser vendor created a new API without input from the appropriate W3C committee to differentiate the browser from other vendors' browsers. Browser differentiation was a prominent feature of the first browser wars, but non-standard browsers are now much less accepted by web developers and users. Browsers are expected to conform to standards. - A browser may have been released before a feature was standardized by the W3C, or the W3C standard may have changed a particular specification. So, the browser vendor may not yet have added the new functionality. - For open source browsers, the browser development team typically consists of volunteers who may not yet have been able to make the browser conform to the latest standards. - A browser may have a bug causing the browser to interpret the code differently than the standard details.

ALL OF THESE

Given the code below, which HTML element are returned by the following: document.getElementsByTagName("li"); CODE: <!DOCTYPE html> <html lang="en"> <meta charset="UTF-8"> <title>Web development languages</title> <body> <p>Languages used in web development.</p> <ul id="myList"> <li id="item-1">HTML for content</li> <li id="item-2">CSS for presentation</li> <li id="item-3">JavaScript for functionality</li> </ul> </body> </html>

All of the list item tags (<li>, <li>,<li>)

What does the Weather API return when an invalid API key is used in a request?

An error message formatted in JSON

A(n) _________________ is a specification of the methods and objects that defines how a programmer should interact with software components.

Application Programming Interface (API)

What will the following print to the page given the code below? var book = {}; book = { title: "Breakthrough", published: 2013, keywords: ["dolphins", "nuclear submarine"] }; document.writeln(book.title); document.writeln(book.keywords[1]);

Breakthrough nuclear submarine

Which selector name matches the following CSS selector? .firstName { background-color: green; }

Class name

Communicating data between the server and browser is a significant task for modern web applications. This is often used to provide a structured format for data based on a subset of the JavaScript language to send data across the network. It is intended to be easily readable by humans and computers. This approach to structuring text data has rapidly become the dominant format of data transfer between web browsers and servers.

JavaScript Object Notation (JSON)

Which of these statements describes the following: img:last-child ? Matches the img element with lincolnPortrait ID. Matches any img element that is the last child of another element. Matches all img elements. Matches img elements with red class name.

Matches any img element that is the last child of another element.

The box model describes the size of each element as a series of nested boxes. The box model is important to understand when considering design and layout. The box model consists of the following: Content, _________, Border, and Margin. Which property (part of the box) is missing above?

Padding

Given the code below, which HTML element are returned by the following: document.getElementById("webDev"); CODE: <!DOCTYPE html> <html lang="en"> <meta charset="UTF-8"> <title>Web development languages</title> <body> <p id="webDev">Languages used in web development.</p> <ul id="myList"> <li id="item-1">HTML for content</li> <li id="item-2">CSS for presentation</li> <li id="item-3">JavaScript for functionality</li> </ul> </body> </html>

The paragraph tag <p>

What does a CSS rule consist of?

a selector, an opening curly brace ({), a declaration block, and then a closing curly brace (}).

What type of value does this JSON structure create? [ { "name": "oreo", "type": "cookie", "flavors": ["chocolate", "vanilla"], "favorite": false, "created": 1912 }, { "name": "snickers", "type": "candy bar", "flavors": ["chocolate", "peanuts", "caramel", "nougat"], "favorite": true, "created": 1930 }, { "name": "malt", "type": "frozen dairy", "flavors": ["vanilla", "chocolate", "strawberry"], "favorite": false, "created": 1922 } ]

array

Which of the following measurement is an example of an absolute size unit?

cm

__________ determines a variable's type at run-time.

dynamic typing

There are three ways CSS can be applied to HTML. Which approach is this? <style> p { color: blue; } </style>

embedded stylesheet

A class name selector is specified with a hash symbol (#) followed by the class name. (T or F?)

false

A web browser will process the HTML following a script element that uses an external JavaScript file while the browser waits for the web server to return the JavaScript file. (T or F?)

false

Is the following statement true (valid) or false (invalid)? In other words, is it written correctly? h1 { background-color = red; }

false

JavaScript is only used for programs that run in a web browser. (T or F)?

false

Style Sheet is a language describing the structure of Web pages using markup. It's elements are the building blocks of HTML pages.

false

The actions a web browser notices are called handlers. (T or F?)

false

Window object properties or methods can not be accessed without putting window. in front of the property or method. (T or F?)

false

The style rules from a parent element cascade down and are applied to any child elements. This concept is called __________.

inheritance

The ___________ property sets or gets a DOM node's content, including all of the node's children, as a string instead of as a tree.

innerHTML

A(n) _____________ executes programming statements without first compiling the statements into machine languages.

interpreter

A(n) __________ is an unordered collection of properties.

object

What is the function call that displays the question variable to the user and retrieve the user's age? question = "What is your name?"; name = ____________;

prompt(question);

What is the selector for the following CSS rule where the rule should cause all hypertext links inside a table to be displayed with the bold font-weight attribute? ________ { font-weight: bold; }

table a

What is the value of d when the loop terminates? var d = 10; while ( d < = 20) document.write( d ); d += 5;

the loop never terminates

In order to use a third-party web API, developers usually have to register with the third party to obtain an API key. Third party API keys are required for the following reasons: - The API key identifies who or what application is using the web API. - The API key helps the third party limit the number of requests made to the API in a fixed time period or may be used to charge a developer a fee for additional requests. - To obtain an API key, developers must agree to restrictions the third party places on data obtained from the web API. (T or F?)

true

Pseudo-class selectors are specified with a colon character followed by a pseudo-class name. Ex. :hover { color : green; } (T or F?)

true

The DOM is accessible via the global object named document. (T or F?)

true

The following are common CSS properties used to control web page elements: color, background, float and clear, and display. (T or F?)

true

What is the data type of fname? var fname;

undefined

What statement declares a variable balance?

var balance;


संबंधित स्टडी सेट्स

LIFE INSURANCE - TAXES AND OTHER INSURANCE CONCEPTS

View Set

Difference Between Nursing Diagnosis, Medical Diagnosis and Collaborative Problems

View Set

Chapter 11 Marketing Channels. Marketing an introduction. Armstrong, Kotler, Trifts, Buchwitz

View Set

Section 2.2.3- History of Computers?

View Set