COP2830 final

¡Supera tus tareas y exámenes ahora con Quizwiz!

An embedded style sheet takes precedence over an external style sheet.​ True False

True

Creating and modifying page layouts in CSS involves specifying size and position information for web page elements. T/F

True

JavaScript has only one type of numeric variable, but it can be used to store integer or floating point numbers. True False

True

​Websites developed with Hypertext Markup Language (HTML) 5 alone can be functional, but they lack the important element of visual appeal.

True

QUESTION 63 To create a rectangle, which of the following attributes must be defined? x position y postion width and height all of the above

all of the above

Which of the following techniques can be used to add JavaScript to a web page? A. Embed the JavaScript within a script element anywhere in the body section. B. Embed the JavaScript within a script element anywhere in the head section. C. Link to JavaScript stored separately in an external file. D. (all of the above)

all of the above

In JavaScript, the + operator A.always indicates additionB.always indicates concatenationC.could indicate either addition or concatenation depending on its operandsD.(none of the other choices)

always indicates addition

The body of statements to be executed in a JavaScript function is enclosed in A.square brackets [ ]B.braces (a.k.a. "curly brackets") { }C.parentheses ( )D.quotes " "

braces

The commands window.screen.availWidth and window.screen.availHeight will allow the developer to access the exact width and height of the screen their page is being displayed on.

true

The navigator.userAgent command withing JavaScript allows us to access information regarding what browser the pae is being displayed on.

true

To track a users mouse coordinates you must first and an Event Listener to the canvas.

true

True or False: JavaScript is case sensitive.

true

​When an image is floated to the right or left of elements containing text content, the effect is to wrap the text around the image.

true

Which JavaScript command will allow us to store a boolean value in the variable vid, to help determine if a browser can play HTML5 video? vid=!!document.createElement('video').canPlayType; vid=document.createElement('video').canPlayType; vid=!!doc.createElement('video').playType; none of the above

vid=!!document.createElement('video').canPlayType;

When setting the size of your canvas, it is preferable to use the _______ command to set the canvas width. window.inner; window.width; window.innerWidth; inner.canvasWidth;

window.innerWidth;

The code:<head><title>My Website</title>​<style>​body {background-color: green;}​</style></head>exemplifies a(n) _____ style sheet where the style rule is placed between the opening <style> and closing </style> tags

embedded

In the following JavaScript statement, the word writeln is a(n) _______________.

event handler

An external style sheet is used when one wants to create styles for a single webpage that are different from the rest of the website.​

false

Margin is the space inside a border between the border and the element content. _________________________

false

The best practice is to apply an inline style sheet when one wants to change the style of one page.​

false

The justify value of the text-align property is used to center content within an element.​ True False

false

The sides of the Cascading Style Sheets (CSS) box model is referred to in counter clockwise order: left, right, bottom, and top.​

false

There is a limit of 100 element types that can be included in a single rule.

false

True or False: JavaScript is a compiled language like C.

false

True or False: JavaScript variable names can begin with a letter, numeral or the underscore character. True False

false

When a style is changed in an embedded stylesheet, it automatically applies the change to every page linked to that style sheet.​

false

​In the context of style sheet precedence, external styles beat embedded styles and embedded styles beat inline styles.

false

​Viewing a web page on a mobile device gives the same experience as viewing the same web page on a desktop computer.

false

The _____ property allows the positioning of an element to the right or left of other elements.​ a.​displayb.​marginc.​floatd.text-align

float

You can make text bold using the ____ property. a.font-weightb.font-stylec.Either A or B.d.Neither A nor B.

font-weight

Which of the following is the JavaScript keyword to start a flow control structure that chooses from multiple alternative processes based on the value of a single expression? A.breakB.caseC.forD.switch

for

How do you declare a function named "myFunction" that receives no passed data? A.function:myFunction();B.function=myFunction();C.function myFunction();D.(none of the other choices)

function=myFunction();

How do you call a function named "myFunction" without passing any data to it? A.myFunction();B.call function myFunction;C.call myFunction();D.(none of the other choices)v

myFunction();

QUESTION 47 CSS lets you specify the exact position of an element on a web page using the ____ property. a.gridb.positionc.rulerd.location

position

The ____ attribute specifies the filename of the external style sheet. a.hrefb.refc.hsourced.source

ref

QUESTION 49 When the CSS property of position is set to ____ it moves the element relative to its original position and allows other elements to flow into the space that the absolutely positioned element would have otherwise occupied. a.rightb.relativec.absoluted.left

relative

A _____ is a rule that defines the appearance of an element on a webpage.​ a.​cascadeb.​stylec.​semanticd.​syntax

style

In JavaScript, which type of dialog box presents: a message, a text box for user reply, and two buttons ("OK" and "Cancel")? A.askB.promptC.queryD.(none of the other choices)

Prompt

Which of the following is not a valid comparison (relational) operator? A.=B.<C.>D.!=

!=

QUESTION 70 To style the div id="container" element, _____ is used as the selector.​ a.​:containerb.​.containerc.​%containerd.​#container

#container

The logical "and" operator to evaluate two relational expressions is A.++B.--C.&&D.||

&&

QUESTION 46 The correct representation of a Cascading Style Sheets (CSS) comment is _____.​ a.​<*/ Place your comment here /*>b.​/* Place your comment here */c.​*/ Place your comment here /*d.​//* Place your comment here *//

/ Place your comment here /

How do you indicate a comment of "This is a comment" in a JavaScript? A. 'This is a comment B. //This is a comment C. <!--This is a comment--> D. rem This is a comment

//this is a comment

Which of the following is not a valid variable name in JavaScript? A.Tax1B.eightball_8C.12footageD.pageNumber1200

12 footage

Which of the following href commands will allow a user to successfully dial a specific number if viewing your page on a mobile phone? <a href="tel:+18005550122"> <a href="telephone:+18005550122"> <a href="call:+18005550122"> <a href="phone:+18005550122">

<a href="tel:+18005550122">

QUESTION 45 Which of the following tags will display the full calender date in YYYY-MM-DD format? <time="2015-06-01" ></time> <time datetime="2015-06-01" ></time> <time date="2015-06-01" ></time> none of the above

<time datetime="2015-06-01" ></time>

Which of the following statements about passing data to or from JavaScript functions is false? A.You can pass more than one value into a JavaScript functionB.You can return a value from JavaScript functionC.A JavaScript function does not have to receive or return any valuesD.(none of the other choices)

A JavaScript function does not have to receive or return any values

Which of the following statements about declaring JavaScript variables is true? A.A variable must be declared before it can be usedB.You can re-declare a variable, but it will lose its original valueC.You can assign a value to an undeclared variable and then declare it after thatD.(none of the other choices)

A variable must be declared before it can be used

What output will be produced by the following JavaScript statement:document.write("Amount:"+2+4); A.Amount:2+4B.Amount:6C.Amount:24D.(none of the other choices)

Amount:6

What character or characters enclose a multi-line comment in a JavaScript? A. standard (double) quotes (") B. a pair of double slashes (//) C. <!-- to start and --> to stop. D. /* to start and */ to stop

B. a pair of double slashes (//)

Both the align-content and align-items properties have a default value of center.​

False

External styles defeat the purpose and advantages of separating style from content, so they should be used sparingly.​

False

It is good practice to try and duplicate your desktop site onto a mobile device exactly.

False

True or False: JavaScript is a subset of the Java programming language.

False

Which of the following statements about variable declaration in JavaScript is false? A.JavaScript allows the use of a variable that has not been declaredB.JavaScript allows more than one variable to be declared on the same lineC.JavaScript allows a variable to be declared and assigned in the same statementD.Once data has been assigned to a JavaScript variable, only that data type may be stored in the variable

JavaScript allows a variable to be declared and assigned in the same statement

Which of the following statements about JavaScript syntax is false? A.The statement terminator/separator symbol is a semi-colonB.JavaScript is case-insensitiveC.Anything on a line following the symbols // will be interpreted as a commentD.You can have a comment that spans multiple lines, if enclosed within /* and */

You can have a comment that spans multiple lines, if enclosed within / and /

QUESTION 64 In JavaScript, the special character sequence used to indicate the start of a new line is A.\\B.\lC.\nD.\r

\\

The _______ element in HTML5 can be used to draw graphics via scripting in JavaScript. draw paint canvas none of the above

canvas

Which of the following attributes allows a user to modify content within a page element? editcontent contenteditable changecontent contentmanipulate

contenteditable

which of the following commands will fully erase all contents from the HTML5 canvas? context.clearRect(0,0,canvas.width,canvas.height); context.eraseRect(0,0,canvas.width,canvas.height); context.clear(0,0,width,height); context.erase(canvas);

context.clearRect(0,0,canvas.width,canvas.height);

Which of the following commands will display text onto a HTML5 canvas? context.writeText('Hello World!', 150, 100); context.type('Hello World!', 150, 100); context.fill('Hello World!', 150, 100); context.fillText('Hello World!', 150, 100);

context.fillText('Hello World!', 150, 100);

var context = canvas.getContext('2d');context.beginPath();context.moveTo(100,100);context.lineTo(300,300);context.quadraticCurveTo(230,200, 250,120);Which command re-positions the drawing point without actual drawing anything to the screen?

context.moveTo(100,100);

Examine the following command:context.drawImage(img, 100, 150);What do the values 100 and 150 represent?

coordinates

Which of the following is a JavaScript loop (repetition) statement pair A.do...untilB.do...whileC.for...doD.while...repeat

do...while

QUESTION 57 What is the correct JavaScript syntax to send the source code "Hello World" to the browser? A.print ("Hello World");B.printf ("Hello World");C.document.write("Hello World");D.response.write("Hello World");

document.write("Hello World");

QUESTION 50 Which JavaScript syntax should be used to start a conditional statement for executing a command only if "n" is NOT equal to 0? A.if (n != 0)B.if <>0C.if =! 0 thenD.if (n <> 0)

if (n != 0)

Which JavaScript syntax should be used to start a conditional statement for executing a command only if "n" is equal to 2? A.if n=2 thenB.if (n==2)C.if n=2D.if n==2 then

if (n==2)

Which part of a counting loop is not enclosed inside the parentheses in a for loop? A.initializationB.bodyC.increment/decrementD.test

initialization

With a(n) _____ style, one adds a style to the start tag for an element.​ a.​inlineb.​semanticc.​externald.​embedded

inline

The four values of left (the default), center, right, or justify is used by the _____ property.​ a.​margin-paddingb.​displayc.​box-shadowd.​text-align

text-align

A single HTML element is limited to ____ attributes. a.24b.48c.96d.There is no limit.

there is no limit

One method of moving the position of an HTML5 canvas is to use the CSS3 property ________. move position transition transform

transform

A site's orientation can be changed through the use of CSS alone, no JavaScript needed.

true

Block elements can contain inline elements.

true

Linked style sheets do not contain any Hypertext Markup Language (HTML) tags.​

true

Style rules are lines or blocks of CSS code that specify the presentation of web page elements. True False

true

The command vid.canPlayType is useful when trying to determine what video formats are supported by a browser.

true

_____ is a language used to describe the formatting of a document written in a markup language such as Hypertext Markup Language (HTML) 5. a.​Cascading Style Sheetsb.​Segregation Style Sheetsc.​Web paging Style sheetsd.​Designing Style Sheets

​Cascading Style Sheets


Conjuntos de estudio relacionados

Health Law 1 (Ch. 29 Law and 9 Underwriting)

View Set

Chapter 10/Section 2: the Crusades

View Set

intro to finance chapter 2 questions

View Set

Chapter 28 - Nursing Care of Patients With Hematologic and Lymphatic Disorders

View Set

Sadlier-Oxford Vocabulary Workshop Level E - Unit 5

View Set

veterinary practice and administration

View Set