Filters
Question type

Study Flashcards

Writing code to look up and change data associated with parts of HTML documents requires a standardized way of referring to the parts of a Web page; this system is known as the Document _________ Model.


A) Element
B) Object
C) Property
D) Method

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

A common method to change the CSS styles of an element in response to a user's actions is to add or remove __________ values from the element in response to events.


A) ID
B) form
C) class
D) CSS

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

To assign a new property value, you use the assignment operator, which is simply a(n) __________.


A) equal sign ( = )
B) plus sign ( + )
C) less-than sign ( < )
D) greater-than sign ( > )

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

The first line of a function begins with the word function, followed by its name and a pair of ____.


A) quotation marks
B) parentheses
C) equal signs
D) exclamation marks

E) A) and D)
F) A) and B)

Correct Answer

verifed

verified

You can access any HTML element by specifying a CSS selector using the querySelector() method._________________________

A) True
B) False

Correct Answer

verifed

verified

JavaScript allows you to create __________, which are values that are stored and that you can access with a name that you specify.


A) events
B) variables
C) event listeners
D) statements

E) A) and D)
F) C) and D)

Correct Answer

verifed

verified

The script element is added to an HTML document to reference an external JavaScript file._________________________

A) True
B) False

Correct Answer

verifed

verified

Using comparison operators, you can create a(n) __________ statement, in which two values are compared and if the result is true, one or more statements are executed.

Correct Answer

verifed

verified

  -Referring to the figure above, what is the role of the three lines of code labeled with the number 1? A)  function call B)  event listener C)  function D)  conditional statement -Referring to the figure above, what is the role of the three lines of code labeled with the number 1?


A) function call
B) event listener
C) function
D) conditional statement

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

Matching Match each commonly used JavaScript property with the appropriate description. -the value of an element's class attribute


A) classValue
B) innerHTML
C) src
D) textContent
E) Value

F) D) and E)
G) C) and D)

Correct Answer

verifed

verified

  -Referring to the figure above, what is the role of the line of code labeled with the number 2? A)  function call B)  event listener C)  function D)  conditional statement -Referring to the figure above, what is the role of the line of code labeled with the number 2?


A) function call
B) event listener
C) function
D) conditional statement

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

​ ​ ​ ​    -Referring to the figure above, what is the role of the line of code labeled with the number 1? A)  It creates an event listener. B)  It is a function. C)  It creates a variable. D)  It is a conditional statement. -Referring to the figure above, what is the role of the line of code labeled with the number 1?


A) It creates an event listener.
B) It is a function.
C) It creates a variable.
D) It is a conditional statement.

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

Method names are always followed by quotation marks.

A) True
B) False

Correct Answer

verifed

verified

The DOM defines ____, which are actions that are associated with an object.


A) modes
B) methods
C) events
D) activities

E) B) and D)
F) A) and C)

Correct Answer

verifed

verified

In the DOM, each HTML element is considered a(n) property._________________________

A) True
B) False

Correct Answer

verifed

verified

The ____ event occurs when a user clicks or touches an element.


A) click
B) submit
C) focus
D) load

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

Case-Based Critical Thinking Question Alicia wants to increase the sizes of images on her website in response to users moving the mouse pointer over them. To add this feature, she plans to use JavaScript. -In Alicia's JavaScript code, she can refer to a user moving the mouse pointer over an element with the __________ event.


A) load
B) mouseover
C) mouseout
D) submit

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Name 3 ways that the punctuation for a function is similar to that of a CSS style rule.

Correct Answer

verifed

verified

1) An opening curly brace ( { ...

View Answer

The ____ event occurs when a user moves the mouse pointer over an element or touches an element.


A) submit
B) mouseover
C) mouseout
D) load

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

You can access any HTML element by specifying a CSS selector using the ____ method.


A) querySelector()
B) addEventListener()
C) checkValidity()
D) write()

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

Showing 41 - 60 of 75

Related Exams

Show Answer