CSS, JavaScript, the DOM Flashcards

1
Q

What is the term for the series of event that must take place to render (display) the initial view of a web page?

A

Critical Rendering Path. Involves loading only the resources absolutely necessary to display a page above the fold, BEFORE ANY SCROLLING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can be done to shorten the critical rendering path?

A

COMBINE external CSS files into one document.
DEFER loading JavaScript file using the onload event.
Use DEFFERED LOADING of images
Put CSS LINK ON TOP of page
Put script REFERENCES AT THE BOTTOM of pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the map of the CSS styles found on a web page called?

A

CSS Object Model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The web browser builds both a ____ out of HTML and a _____ out of the CSS rules.

A

DOM, CSSOM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The DOM and the CSSOM are combined to create a render tree.
(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The _____ is an API that represents and interacts with any HTML or XML document
The _____ is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (element, text string, or comment)

A

The Document Object Model (DOM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The DOM arranges objects in a hierarchy known as a ______.

A

Tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Objects on the tree are called ____ which include:
Document
Elements
Attr
CharacterData (Text, Comment)
DocumentFragment

A

nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Most Dones of a DOM tree have:

A

parent node, child nodes, and siblings nodes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DOM object references in JavaScript are not live. (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Once we have a reference to a node, even if some other code changed the node, our reference would still be up to date. (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

We can run JavaScript even if the DOM hasn’t loaded. (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Useful code to make sure the DOM has loaded before calling code (this is what jQuery ready() does.) (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

constructs that perform basic actions or control the execution of the program

A

Statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

constructs that stand for values, represented by any of the 10 JS data types.

A

Expressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

constructs that introduce identifiers (variable

A

Declarations

17
Q

Operators cannot be parts of expressions or statements. (T/F)

A

False