Deck 12: Working With Document Nodes and Style Sheets Tutorial

Full screen (f)
exit full mode
Question
To represent an element name in the nodeName property, only lowercase letters are used.
Use Space or
up arrow
down arrow
to flip the card.
Question
One advantage of the counter variable method over familial references method is that it also provides the flexibility to insert new nodes into a document within the for loop without having to recalculate the length of the child nodes collection.
Question
When the node.nodeType property returns a value of 8, it indicates that the node is a comment.
Question
The node.childNodes describes a collection of all of the nodes that are direct children of node .
Question
The selectorText property can only be used to read the text of a Cascading Style Sheets (CSS) rule.
Question
The node .previousSibling expression describes the sibling after node.
Question
The style sheet properties that are read-only cannot be changed in JavaScript.
Question
Each parent node can contain only one child node.
Question
The contents of an HTML file are arranged in a hierarchical structure, starting from the root html element itself and moving down to the text strings contained within individual page elements.
Question
An index value of 0 inserts a CSS rule at the end of a style sheet.
Question
Element nodes do not have a value for the nodeValue property.
Question
The document object model supports several methods to create, attach, and set the values of attributes.
Question
All the versions of Internet Explorer before IE9 do not support element node properties.
Question
The innerHTML property is equally effective for large document structures as it is for small fragments of HTML code.
Question
To create or set an attribute for an element, the createAttribute () method is used.
Question
The node.nodeType property returns the value of a node.
Question
An attribute node contains an attribute that can be attached to an element node.
Question
The insertrule() method is used to add style rules to an embedded style sheet.
Question
The node .firstElementChild property is applicable only to element nodes.
Question
Style sheets loaded into a web document, both external sheets and embedded style sheets, are part of an object collection .
Question
Which of the following methods is used to create an attribute node with the name age ?

A) document.create( attribute,age )
B) document.createAttribute( age )
C) Document_createAttribute_ age
D) Document_createAttribute( attribute,age )
Question
Which of the following methods affixes the new node as a child of a specified node?

A) node. normalize( new, old )
B) node. insertBefore( new, child )
C) node .appendChild( new )
D) node. childNodes( new )
Question
The _____ method discards the old node from node .

A) node. replaceChild( new, old )
B) node. normalize(old)
C) node. removeChild( old )
D) node .appendChild( old )
Question
Identify the syntax for looping through a collection of child nodes using the counter variable method.

A) for (var i = 0; i node .length.node; i++ ) { commands }
B) for (var i = 0; i node .childNodes.length; i++ ) { commands }
C) for (var i = 1; i node .childNodes.length; i-- ) { commands }
D) for (var i = 1; i i++ ) { commands }
Question
Which of the following values is returned by the node.nodeType property when the node is a document?

A) 2
B) 3
C) 8
D) 9
Question
Identify the value of the node.nodeValue property for the element node.

A) null
B) string
C) text
D) value
Question
In the following code, identify the value of children.length property if article is the element node. The U.S. Constitution Preamble We the People of the United States, in Order to form a more perfect Union …

A) 1
B) 2
C) 3
D) 4
Question
Identify the property that describes a collection of all of the element nodes contained within node .

A) node.children
B) node.children.length
C) node.childElementCount
D) node.ownerdocument
Question
Which of the following methods includes or embeds a new node directly ahead of a child node?

A) node. insert(new, old)
B) node. insertBefore( new, child )
C) node. replaceChild( new, old )
D) node .appendChild( new )
Question
Identify a true statement about the counter variable method for looping through a collection of child nodes.

A) It enables the child nodes in the for loop to have the object reference as node .childNodes[ i ]
B) It allows insertion of new node into a document within the for loop.
C) It speeds up the processing time of looping through child nodes.
D) It does not require a browser to calculate the total length of the child nodes collection.
Question
Identify a true statement about the method node .cloneNode( deep ) .

A) It creates an element node with the name "deep".
B) It creates a text node where deep is a string value.
C) It creates a copy of node where deep is a Boolean value.
D) It creates a copy of node with the name "deep".
Question
Identify the value returned by the node.nodeType property for an element node.

A) 2
B) 8
C) 1
D) 9
Question
Identify the node type when the node . nodeType property returns a value of 3.

A) Attribute
B) Text
C) Comment
D) Document
Question
The _____ method can be used to create a comment node containing the comment text .

A) document.create( comment,text )
B) document.createComment( text )
C) document.create(text)Comment
D) document.create. text. Comment
Question
Identify the method used to create an element node with the name elm .

A) document.createElement. elm
B) document.createElement (elm)
C) document.createElement
D) document.create( element,elm)
Question
Which of the following methods creates a node containing the text string text ?

A) document_createText( text )
B) document.createText( text )
C) document_create_TextNode( text )
D) document.createTextNode( text )
Question
The _____ method traverses all of the child nodes of node where any adjacent text nodes are merged into a single text node.

A) node .append()
B) node .cloneNode()
C) node .children.length()
D) node. normalize()
Question
Which of the following methods uses familial reference to loop through a collection of child nodes?

A) for (var n = node .firstChild; n !== null; n = n .nextSibling) { commands }
B) for (var n = node .firstChild; n !== null; n = n .previousSibling) { commands }
C) for (var n = node .firstChild; n !== null; n = n .firstChild) { commands }
D) for (var n = node .firstChild; n !== null; n = n .lastChild) { commands }
Question
Identify the method that eliminates the old node and exchanges it with a new node.

A) node. replaceChild( new, old )
B) node. normalize(old, new)
C) node. removeChild( old, new )
D) node .appendChild( old, new )
Question
Identify the syntax that determines how a new item is inserted into a nested list.

A) if (headLevel > prevLevel) { // Append the list item to the current list } else if (headLevel // Start a new nested list } else { // Append the entry to a higher list }
B) if (headLevel === prevLevel) { // Append the list item to the current list } else if (headLevel > prevLevel) { // Start a new nested list } else { // Append the entry to a higher list }
C) if (headLevel > prevLevel) { // Append the list item to the current list } else if (headLevel === prevLevel) { // Start a new nested list } else { // Append the entry to a higher list }
D) if (headLevel !=== prevLevel) { // Append the list item to the current list } else if (headLevel // Start a new nested list } else { // Append the entry to a higher list }
Question
Which of the following properties returns the Boolean value true when an element contains an attribute?

A) node .getAttribute
B) node .hasAttribute
C) node .setAttribute
D) node.Attribute
Question
Joshua has created a web page and implemented CSS in it. He has applied the style property to inline styles that can also be used with style rules and with style sheets. However, he wants to change a CSS rule in the stylesheet from h2 { color: blue; } to h3 { color: green; font-size: 1.2em; }

A) document.styleSheets[0]. cssRules[1].selectorText = "h2"; document.styleSheets[0]. cssRules[1].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
B) document.styleSheets[1]. cssRules[0].selectorText = "h3"; document.styleSheets[1]. cssRules[0].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
C) document.styleSheets[1]. cssRules[0].selectorText = "h2"; document.styleSheets[1]. cssRules[0].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
D) document.styleSheets[0]. cssRules[1].selectorText = "h3"; document.styleSheets[0]. cssRules[1].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
Question
William has created a page view style sheet and saved it in a file named esd.css. Which of the following tags should William add to the document head to apply the style sheet?

A) < link media="esd.css" rel="stylesheet" />
B) < link title="esd.css" rel="stylesheet" />
C) < link href="esd.css" rel="stylesheet" />
D) < link type="esd.css" rel="stylesheet" />
Question
The _____ style rule is described by the rule.type property if it returns an integer value of 6.

A) @charset
B) @import
C) @media
D) @page
Question
Identify the syntax to remove a rule from a style sheet.

A) sheet .deleteRule( rule , index )
B) sheet .deleteRule( index )
C) sheet .deleteRule( rule )
D) sheet .deleteRule( index, rule )
Question
Identify the syntax for adding new rules to a style sheet.

A) sheet .insertRule( rule , index )
B) sheet .insertRule( index )
C) sheet .insertRule( rule )
D) sheet .insertRule( index, rule )
Question
The _____ property represents the object collection of style guidelines within a style sheet.

A) sheet.parentStyleSheet
B) sheet.title
C) sheet.type
D) sheet.cssRules
Question
Which of the following code creates a list item element by using the setAttribute () method to set the ID value of the list item to the text string "list1"?

A) var listElem = document.createElement("li"); listElem.setAttribute("id","list1");
B) var listElem = document.createElement("list1"); listElem.setAttribute("id");
C) var listElem = document.Element("li"); listElem.setAttribute("list1");
D) var listElem = document.createElement("li"); listElem.getAttribute("id",list1);
Question
Which of the following methods returns the collection of attributes associated with node ?

A) node .getAttribute
B) node .attributes
C) node .hasAttribute
D) node. attributes.nodeName
Question
Identify the HTML code to create form buttons to switch between the web view and page view.

A) < div id="styleButtons"> < input type="button" value="Web View" />
< input type="button" value="Page View" />
B) < div id="styleButtons"> < input value="button" type="Web View" />
< input value="button" type="Page View" />
< /div>
C) < div id="styleButtons"> < input style="button" value="Web View" />
< input style="button" value="Page View" />
< /div>
D) < div id="styleButtons"> < input="button" type="Web View" />
< input="button" type="Page View" />
< div>
Question
Identify the integer value returned by the rule.type property if it is describing the @media rule.

A) 1
B) 2
C) 3
D) 4
Question
Identify the correct syntax to move up a node tree.

A) var levelUp = prevLevel - headLevel; for (var i = 1; i outlineList = outlineList.parentNode.parentNode; }
B) var levelUp = prevLevel - headLevel; for (var i = 0; i >= levelUp; i++) { outlineList = outlineList.parentNode; }
C) var levelUp = prevLevel + headLevel; for (var i = 1; i >= levelUp; i++) { outlineList = parentNode.outlineList.parentNode; }
D) var levelUp = prevLevel - headLevel; for (var i = 0; i >= levelUp; i++) { outlineList = parentNode.outlineList.parentNode; }
Question
Which of the following codes inserts text for each item as a hyperlink?

A) var linkElem = document.createElement("a"); linkElem.innerHTML = linkElem.setAttribute("href", "#" + n.id);
B) var linkElem = document.createElement("a"); linkElem.innerHTML = n.innerHTML; linkElem.setAttribute("href")
C) var linkElem = document.createElement("a"); linkElem.innerHTML = n.innerHTML; linkElem.setAttribute("href", "#" + n.id);
D) var linkElem = document.createElement("a"); linkElem.setAttribute("href", "#" + n.id);
Question
Which of these rules is represented by the rule.type property when its value is 5?

A) @media
B) @font-face
C) unknown
D) style rule
Question
Identify a true statement about the sheet. parentStyleSheet property .

A) It describes the URL of the style sheet file or an empty text string for an embedded style sheet.
B) It describes the style sheet object containing the style sheet inserted via the @ import rule.
C) It describes the object collection of style rules within the style sheet.
D) It describes a Boolean value to indicate whether the style sheet is enabled (false) or disabled (true).
Question
A value of _____ is returned when the rule.type property describes the @charset rule.

A) 1
B) 2
C) 3
D) 4
Question
The _____ property describes the embed or link element node that creates a style sheet.

A) sheet.elementnode
B) sheet.rootnode
C) sheet.ownerNode
D) sheet.attributenode
Question
Which of these properties describes the URL of a styleSheet file?

A) sheet.media
B) sheet.href
C) sheet.type
D) sheet.title
Question
In the following HTML code, the object reference document.styleSheets[0].cssRules[1] points to the _____ style rule. h1 {color: red;} h2 {color: blue;} h3 {color: green;} h4 {color: violet;}

A) First, h1 {color: red;}
B) Second, h2 {color: blue;}
C) Third, h3 {color: green;}
D) Fourth, h4 {color: violet;}
Question
Which of these nodes is absent from a node tree?

A) element node
B) text node
C) comment node
D) attribute node
Question
Match between columns
The text of the patterns that select the element(s) to be styled for rule
node .nextElementSibling
The text of the patterns that select the element(s) to be styled for rule
node .childElementCount
The text of the patterns that select the element(s) to be styled for rule
node .children.length
The text of the patterns that select the element(s) to be styled for rule
node .lastElementChild
The text of the patterns that select the element(s) to be styled for rule
node .previousElementSibling
The text of the patterns that select the element(s) to be styled for rule
rule .selectorText
The text of the patterns that select the element(s) to be styled for rule
rule. cssText
The text of the patterns that select the element(s) to be styled for rule
rule .style. property
The text of the patterns that select the element(s) to be styled for rule
rule . parentStyleSheet
The text of the patterns that select the element(s) to be styled for rule
rule .parentRule
The immediate sibling element before node
node .nextElementSibling
The immediate sibling element before node
node .childElementCount
The immediate sibling element before node
node .children.length
The immediate sibling element before node
node .lastElementChild
The immediate sibling element before node
node .previousElementSibling
The immediate sibling element before node
rule .selectorText
The immediate sibling element before node
rule. cssText
The immediate sibling element before node
rule .style. property
The immediate sibling element before node
rule . parentStyleSheet
The immediate sibling element before node
rule .parentRule
The contents of rule as a text string (read-only)
node .nextElementSibling
The contents of rule as a text string (read-only)
node .childElementCount
The contents of rule as a text string (read-only)
node .children.length
The contents of rule as a text string (read-only)
node .lastElementChild
The contents of rule as a text string (read-only)
node .previousElementSibling
The contents of rule as a text string (read-only)
rule .selectorText
The contents of rule as a text string (read-only)
rule. cssText
The contents of rule as a text string (read-only)
rule .style. property
The contents of rule as a text string (read-only)
rule . parentStyleSheet
The contents of rule as a text string (read-only)
rule .parentRule
The number of child elements within node
node .nextElementSibling
The number of child elements within node
node .childElementCount
The number of child elements within node
node .children.length
The number of child elements within node
node .lastElementChild
The number of child elements within node
node .previousElementSibling
The number of child elements within node
rule .selectorText
The number of child elements within node
rule. cssText
The number of child elements within node
rule .style. property
The number of child elements within node
rule . parentStyleSheet
The number of child elements within node
rule .parentRule
The value of a style feature within rule
node .nextElementSibling
The value of a style feature within rule
node .childElementCount
The value of a style feature within rule
node .children.length
The value of a style feature within rule
node .lastElementChild
The value of a style feature within rule
node .previousElementSibling
The value of a style feature within rule
rule .selectorText
The value of a style feature within rule
rule. cssText
The value of a style feature within rule
rule .style. property
The value of a style feature within rule
rule . parentStyleSheet
The value of a style feature within rule
rule .parentRule
The final element within node
node .nextElementSibling
The final element within node
node .childElementCount
The final element within node
node .children.length
The final element within node
node .lastElementChild
The final element within node
node .previousElementSibling
The final element within node
rule .selectorText
The final element within node
rule. cssText
The final element within node
rule .style. property
The final element within node
rule . parentStyleSheet
The final element within node
rule .parentRule
The total number of child elements within node
node .nextElementSibling
The total number of child elements within node
node .childElementCount
The total number of child elements within node
node .children.length
The total number of child elements within node
node .lastElementChild
The total number of child elements within node
node .previousElementSibling
The total number of child elements within node
rule .selectorText
The total number of child elements within node
rule. cssText
The total number of child elements within node
rule .style. property
The total number of child elements within node
rule . parentStyleSheet
The total number of child elements within node
rule .parentRule
The style rule containing rule as a parent (read-only)
node .nextElementSibling
The style rule containing rule as a parent (read-only)
node .childElementCount
The style rule containing rule as a parent (read-only)
node .children.length
The style rule containing rule as a parent (read-only)
node .lastElementChild
The style rule containing rule as a parent (read-only)
node .previousElementSibling
The style rule containing rule as a parent (read-only)
rule .selectorText
The style rule containing rule as a parent (read-only)
rule. cssText
The style rule containing rule as a parent (read-only)
rule .style. property
The style rule containing rule as a parent (read-only)
rule . parentStyleSheet
The style rule containing rule as a parent (read-only)
rule .parentRule
The style sheet containing rule (read-only)
node .nextElementSibling
The style sheet containing rule (read-only)
node .childElementCount
The style sheet containing rule (read-only)
node .children.length
The style sheet containing rule (read-only)
node .lastElementChild
The style sheet containing rule (read-only)
node .previousElementSibling
The style sheet containing rule (read-only)
rule .selectorText
The style sheet containing rule (read-only)
rule. cssText
The style sheet containing rule (read-only)
rule .style. property
The style sheet containing rule (read-only)
rule . parentStyleSheet
The style sheet containing rule (read-only)
rule .parentRule
The immediate sibling element after node
node .nextElementSibling
The immediate sibling element after node
node .childElementCount
The immediate sibling element after node
node .children.length
The immediate sibling element after node
node .lastElementChild
The immediate sibling element after node
node .previousElementSibling
The immediate sibling element after node
rule .selectorText
The immediate sibling element after node
rule. cssText
The immediate sibling element after node
rule .style. property
The immediate sibling element after node
rule . parentStyleSheet
The immediate sibling element after node
rule .parentRule
Question
Jonathan wants to access the last style sheet in the object collection document.styleSheets . Which of the following syntaxes should he use to reference the last style sheet?

A) document.styleSheets [document.styleSheets.length+1]
B) document.styleSheets[length+1]
C) document.styleSheets [document.styleSheets.length-1]
D) document.styleSheets[length-1]
Question
Match between columns
The style sheet containing rule (read-only)
node .nextElementSibling
The style sheet containing rule (read-only)
node .childElementCount
The style sheet containing rule (read-only)
node .children.length
The style sheet containing rule (read-only)
node .lastElementChild
The style sheet containing rule (read-only)
node .previousElementSibling
The style sheet containing rule (read-only)
rule .selectorText
The style sheet containing rule (read-only)
rule. cssText
The style sheet containing rule (read-only)
rule .style. property
The style sheet containing rule (read-only)
rule . parentStyleSheet
The style sheet containing rule (read-only)
rule .parentRule
The text of the patterns that select the element(s) to be styled for rule
node .nextElementSibling
The text of the patterns that select the element(s) to be styled for rule
node .childElementCount
The text of the patterns that select the element(s) to be styled for rule
node .children.length
The text of the patterns that select the element(s) to be styled for rule
node .lastElementChild
The text of the patterns that select the element(s) to be styled for rule
node .previousElementSibling
The text of the patterns that select the element(s) to be styled for rule
rule .selectorText
The text of the patterns that select the element(s) to be styled for rule
rule. cssText
The text of the patterns that select the element(s) to be styled for rule
rule .style. property
The text of the patterns that select the element(s) to be styled for rule
rule . parentStyleSheet
The text of the patterns that select the element(s) to be styled for rule
rule .parentRule
The total number of child elements within node
node .nextElementSibling
The total number of child elements within node
node .childElementCount
The total number of child elements within node
node .children.length
The total number of child elements within node
node .lastElementChild
The total number of child elements within node
node .previousElementSibling
The total number of child elements within node
rule .selectorText
The total number of child elements within node
rule. cssText
The total number of child elements within node
rule .style. property
The total number of child elements within node
rule . parentStyleSheet
The total number of child elements within node
rule .parentRule
The number of child elements within node
node .nextElementSibling
The number of child elements within node
node .childElementCount
The number of child elements within node
node .children.length
The number of child elements within node
node .lastElementChild
The number of child elements within node
node .previousElementSibling
The number of child elements within node
rule .selectorText
The number of child elements within node
rule. cssText
The number of child elements within node
rule .style. property
The number of child elements within node
rule . parentStyleSheet
The number of child elements within node
rule .parentRule
The contents of rule as a text string (read-only)
node .nextElementSibling
The contents of rule as a text string (read-only)
node .childElementCount
The contents of rule as a text string (read-only)
node .children.length
The contents of rule as a text string (read-only)
node .lastElementChild
The contents of rule as a text string (read-only)
node .previousElementSibling
The contents of rule as a text string (read-only)
rule .selectorText
The contents of rule as a text string (read-only)
rule. cssText
The contents of rule as a text string (read-only)
rule .style. property
The contents of rule as a text string (read-only)
rule . parentStyleSheet
The contents of rule as a text string (read-only)
rule .parentRule
The immediate sibling element after node
node .nextElementSibling
The immediate sibling element after node
node .childElementCount
The immediate sibling element after node
node .children.length
The immediate sibling element after node
node .lastElementChild
The immediate sibling element after node
node .previousElementSibling
The immediate sibling element after node
rule .selectorText
The immediate sibling element after node
rule. cssText
The immediate sibling element after node
rule .style. property
The immediate sibling element after node
rule . parentStyleSheet
The immediate sibling element after node
rule .parentRule
The value of a style feature within rule
node .nextElementSibling
The value of a style feature within rule
node .childElementCount
The value of a style feature within rule
node .children.length
The value of a style feature within rule
node .lastElementChild
The value of a style feature within rule
node .previousElementSibling
The value of a style feature within rule
rule .selectorText
The value of a style feature within rule
rule. cssText
The value of a style feature within rule
rule .style. property
The value of a style feature within rule
rule . parentStyleSheet
The value of a style feature within rule
rule .parentRule
The immediate sibling element before node
node .nextElementSibling
The immediate sibling element before node
node .childElementCount
The immediate sibling element before node
node .children.length
The immediate sibling element before node
node .lastElementChild
The immediate sibling element before node
node .previousElementSibling
The immediate sibling element before node
rule .selectorText
The immediate sibling element before node
rule. cssText
The immediate sibling element before node
rule .style. property
The immediate sibling element before node
rule . parentStyleSheet
The immediate sibling element before node
rule .parentRule
The final element within node
node .nextElementSibling
The final element within node
node .childElementCount
The final element within node
node .children.length
The final element within node
node .lastElementChild
The final element within node
node .previousElementSibling
The final element within node
rule .selectorText
The final element within node
rule. cssText
The final element within node
rule .style. property
The final element within node
rule . parentStyleSheet
The final element within node
rule .parentRule
The style rule containing rule as a parent (read-only)
node .nextElementSibling
The style rule containing rule as a parent (read-only)
node .childElementCount
The style rule containing rule as a parent (read-only)
node .children.length
The style rule containing rule as a parent (read-only)
node .lastElementChild
The style rule containing rule as a parent (read-only)
node .previousElementSibling
The style rule containing rule as a parent (read-only)
rule .selectorText
The style rule containing rule as a parent (read-only)
rule. cssText
The style rule containing rule as a parent (read-only)
rule .style. property
The style rule containing rule as a parent (read-only)
rule . parentStyleSheet
The style rule containing rule as a parent (read-only)
rule .parentRule
Question
Case-Based Critical Thinking Questions Case 12-4 Jonathan has created a web document and has included multiple stylesheets in it. He wants to access details of the stylesheets included in the web document using stylesheet properties. Which of the following properties will provide Jonathan with the exact number of stylesheets loaded into the web document?

A) document.styleSheets.length
B) document.styleSheets.size
C) document.styleSheets.title
D) document.styleSheets.number
Question
Case-Based Critical Thinking Questions Case 12-2 Samantha has been asked by her university to create a website that contains a list of all the subjects that the students in Computer Science and Information Science can take up during each semester in college. She wants to create a nested list that will contain an h1 heading level for a student's chosen subject stream, h2 heading level for the semester number, h3 heading level for the name of the subject, and h4 heading level for its subdivisions. Which of the following rules must Samantha use to determine the insertion of a sub division of a subject right after the subject is inserted into the list?

A) The sub-division of the subject will simply be appended to the current ordered list.
B) The sub-division of the subject will be placed in a new ordered list that is nested within the current ordered list.
C) The sub-division of the subject will be appended to the corresponding ordered list higher up in the table of contents
D) The sub-division of the subject can be placed anywhere in the list as long as it is mentioned.
Question
Match between columns
Premises:
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
Responses:
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
Question
Explain the statement: " Nodes in the node tree have a familial relationship."
Question
What are calculated styles based on? Explain how the calculated value of a specific style is retrieved.
Question
Explain the hierarchical or tree-like structure of an HTML file with an example.
Question
Case-Based Critical Thinking Questions Case 12-3 Natasha has created the following nested list: h1 text h1 text h2 text h2 text h3 text h3 text h4 text h1 text Identify the total number of times the parentNode property will be applied if Natasha wants to move from the h4 heading level to the h1 heading level.

A) 3
B) 4
C) 6
D) 8
Question
Case-Based Critical Thinking Questions Case 12-2 Samantha has been asked by her university to create a website that contains a list of all the subjects that the students in Computer Science and Information Science can take up during each semester in college. She wants to create a nested list that will contain an h1 heading level for a student's chosen subject stream, h2 heading level for the semester number, h3 heading level for the name of the subject, and h4 heading level for its subdivisions. While creating the nested list, Samantha has to include Computer Science as a new list item. Identify the level of the newly inserted item.

A) 0
B) 1
C) 2
D) 3
Question
Case-Based Critical Thinking Questions Case 12-1 Consider the following code that Wilson has written in HTML: Historic Documents Dept. of History The constitution online. Identify the value that the node.nodeType property will return for the "Dept. of History" node.

A) 1
B) 2
C) 3
D) 9
Question
Case-Based Critical Thinking Questions Case 12-3 Natasha has created the following nested list: h1 text h1 text h2 text h2 text h3 text h3 text h4 text h1 text Natasha wants to add a new entry to the accompanying list, which requires her moving from the h3 heading level to the h1 heading level. Identify the number of levels Natasha needs to traverse to add the new entry to the list.

A) 4
B) 3
C) 2
D) 0
Question
Case-Based Critical Thinking Questions Case 12-5 William has created the following style sheet rule for his website. h1 {color: violet;} h2 {color: yellow;} h3 {color: black;} h4 {color: blue;} Which of the following syntaxes must William apply to the style sheet to remove the color violet completely from the website?

A) sheet .deleteRule( 0 )
B) document.deleteRule(0)
C) sheet .deleteRule( 1 )
D) document.deleteRule(1)
Question
Case-Based Critical Thinking Questions Case 12-5 William has created the following style sheet rule for his website. h1 {color: violet;} h2 {color: yellow;} h3 {color: black;} h4 {color: blue;} While creating the website, William wants to add a new style sheet rule to the code. h3 { color: magenta; } Identify the correct syntax for adding the style as the fifth rule in the accompanying code.

A) document.styleSheets[0].insertRule("h3 {color: magenta;}", 4);
B) document.styleSheets.insertRule[1]("h3 {color: magenta;}", 5);
C) document.insertRule[0]("h3 {color: magenta;}", 4);
D) document.insertRule[1].StyleSheets("h3 {color: magenta;}", 5);
Question
Case-Based Critical Thinking Questions Case 12-1 Consider the following code that Wilson has written in HTML: Historic Documents Dept. of History The constitution online. Identify the headLevel value for the element node "Dept. of History".

A) 0
B) 1
C) 2
D) 3
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/76
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Working With Document Nodes and Style Sheets Tutorial
1
To represent an element name in the nodeName property, only lowercase letters are used.
True
2
One advantage of the counter variable method over familial references method is that it also provides the flexibility to insert new nodes into a document within the for loop without having to recalculate the length of the child nodes collection.
False
3
When the node.nodeType property returns a value of 8, it indicates that the node is a comment.
True
4
The node.childNodes describes a collection of all of the nodes that are direct children of node .
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
5
The selectorText property can only be used to read the text of a Cascading Style Sheets (CSS) rule.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
6
The node .previousSibling expression describes the sibling after node.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
7
The style sheet properties that are read-only cannot be changed in JavaScript.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
8
Each parent node can contain only one child node.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
9
The contents of an HTML file are arranged in a hierarchical structure, starting from the root html element itself and moving down to the text strings contained within individual page elements.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
10
An index value of 0 inserts a CSS rule at the end of a style sheet.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
11
Element nodes do not have a value for the nodeValue property.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
12
The document object model supports several methods to create, attach, and set the values of attributes.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
13
All the versions of Internet Explorer before IE9 do not support element node properties.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
14
The innerHTML property is equally effective for large document structures as it is for small fragments of HTML code.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
15
To create or set an attribute for an element, the createAttribute () method is used.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
16
The node.nodeType property returns the value of a node.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
17
An attribute node contains an attribute that can be attached to an element node.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
18
The insertrule() method is used to add style rules to an embedded style sheet.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
19
The node .firstElementChild property is applicable only to element nodes.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
20
Style sheets loaded into a web document, both external sheets and embedded style sheets, are part of an object collection .
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following methods is used to create an attribute node with the name age ?

A) document.create( attribute,age )
B) document.createAttribute( age )
C) Document_createAttribute_ age
D) Document_createAttribute( attribute,age )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following methods affixes the new node as a child of a specified node?

A) node. normalize( new, old )
B) node. insertBefore( new, child )
C) node .appendChild( new )
D) node. childNodes( new )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
23
The _____ method discards the old node from node .

A) node. replaceChild( new, old )
B) node. normalize(old)
C) node. removeChild( old )
D) node .appendChild( old )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
24
Identify the syntax for looping through a collection of child nodes using the counter variable method.

A) for (var i = 0; i node .length.node; i++ ) { commands }
B) for (var i = 0; i node .childNodes.length; i++ ) { commands }
C) for (var i = 1; i node .childNodes.length; i-- ) { commands }
D) for (var i = 1; i i++ ) { commands }
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
25
Which of the following values is returned by the node.nodeType property when the node is a document?

A) 2
B) 3
C) 8
D) 9
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
26
Identify the value of the node.nodeValue property for the element node.

A) null
B) string
C) text
D) value
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
27
In the following code, identify the value of children.length property if article is the element node. The U.S. Constitution Preamble We the People of the United States, in Order to form a more perfect Union …

A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
28
Identify the property that describes a collection of all of the element nodes contained within node .

A) node.children
B) node.children.length
C) node.childElementCount
D) node.ownerdocument
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following methods includes or embeds a new node directly ahead of a child node?

A) node. insert(new, old)
B) node. insertBefore( new, child )
C) node. replaceChild( new, old )
D) node .appendChild( new )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
30
Identify a true statement about the counter variable method for looping through a collection of child nodes.

A) It enables the child nodes in the for loop to have the object reference as node .childNodes[ i ]
B) It allows insertion of new node into a document within the for loop.
C) It speeds up the processing time of looping through child nodes.
D) It does not require a browser to calculate the total length of the child nodes collection.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
31
Identify a true statement about the method node .cloneNode( deep ) .

A) It creates an element node with the name "deep".
B) It creates a text node where deep is a string value.
C) It creates a copy of node where deep is a Boolean value.
D) It creates a copy of node with the name "deep".
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
32
Identify the value returned by the node.nodeType property for an element node.

A) 2
B) 8
C) 1
D) 9
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
33
Identify the node type when the node . nodeType property returns a value of 3.

A) Attribute
B) Text
C) Comment
D) Document
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
34
The _____ method can be used to create a comment node containing the comment text .

A) document.create( comment,text )
B) document.createComment( text )
C) document.create(text)Comment
D) document.create. text. Comment
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
35
Identify the method used to create an element node with the name elm .

A) document.createElement. elm
B) document.createElement (elm)
C) document.createElement
D) document.create( element,elm)
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
36
Which of the following methods creates a node containing the text string text ?

A) document_createText( text )
B) document.createText( text )
C) document_create_TextNode( text )
D) document.createTextNode( text )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
37
The _____ method traverses all of the child nodes of node where any adjacent text nodes are merged into a single text node.

A) node .append()
B) node .cloneNode()
C) node .children.length()
D) node. normalize()
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
38
Which of the following methods uses familial reference to loop through a collection of child nodes?

A) for (var n = node .firstChild; n !== null; n = n .nextSibling) { commands }
B) for (var n = node .firstChild; n !== null; n = n .previousSibling) { commands }
C) for (var n = node .firstChild; n !== null; n = n .firstChild) { commands }
D) for (var n = node .firstChild; n !== null; n = n .lastChild) { commands }
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
39
Identify the method that eliminates the old node and exchanges it with a new node.

A) node. replaceChild( new, old )
B) node. normalize(old, new)
C) node. removeChild( old, new )
D) node .appendChild( old, new )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
40
Identify the syntax that determines how a new item is inserted into a nested list.

A) if (headLevel > prevLevel) { // Append the list item to the current list } else if (headLevel // Start a new nested list } else { // Append the entry to a higher list }
B) if (headLevel === prevLevel) { // Append the list item to the current list } else if (headLevel > prevLevel) { // Start a new nested list } else { // Append the entry to a higher list }
C) if (headLevel > prevLevel) { // Append the list item to the current list } else if (headLevel === prevLevel) { // Start a new nested list } else { // Append the entry to a higher list }
D) if (headLevel !=== prevLevel) { // Append the list item to the current list } else if (headLevel // Start a new nested list } else { // Append the entry to a higher list }
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
41
Which of the following properties returns the Boolean value true when an element contains an attribute?

A) node .getAttribute
B) node .hasAttribute
C) node .setAttribute
D) node.Attribute
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
42
Joshua has created a web page and implemented CSS in it. He has applied the style property to inline styles that can also be used with style rules and with style sheets. However, he wants to change a CSS rule in the stylesheet from h2 { color: blue; } to h3 { color: green; font-size: 1.2em; }

A) document.styleSheets[0]. cssRules[1].selectorText = "h2"; document.styleSheets[0]. cssRules[1].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
B) document.styleSheets[1]. cssRules[0].selectorText = "h3"; document.styleSheets[1]. cssRules[0].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
C) document.styleSheets[1]. cssRules[0].selectorText = "h2"; document.styleSheets[1]. cssRules[0].style.color = "blue"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
D) document.styleSheets[0]. cssRules[1].selectorText = "h3"; document.styleSheets[0]. cssRules[1].style.color = "green"; document.styleSheets[0] .cssRules[1].style.fontSize = "1.2em";
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
43
William has created a page view style sheet and saved it in a file named esd.css. Which of the following tags should William add to the document head to apply the style sheet?

A) < link media="esd.css" rel="stylesheet" />
B) < link title="esd.css" rel="stylesheet" />
C) < link href="esd.css" rel="stylesheet" />
D) < link type="esd.css" rel="stylesheet" />
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
44
The _____ style rule is described by the rule.type property if it returns an integer value of 6.

A) @charset
B) @import
C) @media
D) @page
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
45
Identify the syntax to remove a rule from a style sheet.

A) sheet .deleteRule( rule , index )
B) sheet .deleteRule( index )
C) sheet .deleteRule( rule )
D) sheet .deleteRule( index, rule )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
46
Identify the syntax for adding new rules to a style sheet.

A) sheet .insertRule( rule , index )
B) sheet .insertRule( index )
C) sheet .insertRule( rule )
D) sheet .insertRule( index, rule )
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
47
The _____ property represents the object collection of style guidelines within a style sheet.

A) sheet.parentStyleSheet
B) sheet.title
C) sheet.type
D) sheet.cssRules
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
48
Which of the following code creates a list item element by using the setAttribute () method to set the ID value of the list item to the text string "list1"?

A) var listElem = document.createElement("li"); listElem.setAttribute("id","list1");
B) var listElem = document.createElement("list1"); listElem.setAttribute("id");
C) var listElem = document.Element("li"); listElem.setAttribute("list1");
D) var listElem = document.createElement("li"); listElem.getAttribute("id",list1);
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
49
Which of the following methods returns the collection of attributes associated with node ?

A) node .getAttribute
B) node .attributes
C) node .hasAttribute
D) node. attributes.nodeName
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
50
Identify the HTML code to create form buttons to switch between the web view and page view.

A) < div id="styleButtons"> < input type="button" value="Web View" />
< input type="button" value="Page View" />
B) < div id="styleButtons"> < input value="button" type="Web View" />
< input value="button" type="Page View" />
< /div>
C) < div id="styleButtons"> < input style="button" value="Web View" />
< input style="button" value="Page View" />
< /div>
D) < div id="styleButtons"> < input="button" type="Web View" />
< input="button" type="Page View" />
< div>
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
51
Identify the integer value returned by the rule.type property if it is describing the @media rule.

A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
52
Identify the correct syntax to move up a node tree.

A) var levelUp = prevLevel - headLevel; for (var i = 1; i outlineList = outlineList.parentNode.parentNode; }
B) var levelUp = prevLevel - headLevel; for (var i = 0; i >= levelUp; i++) { outlineList = outlineList.parentNode; }
C) var levelUp = prevLevel + headLevel; for (var i = 1; i >= levelUp; i++) { outlineList = parentNode.outlineList.parentNode; }
D) var levelUp = prevLevel - headLevel; for (var i = 0; i >= levelUp; i++) { outlineList = parentNode.outlineList.parentNode; }
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
53
Which of the following codes inserts text for each item as a hyperlink?

A) var linkElem = document.createElement("a"); linkElem.innerHTML = linkElem.setAttribute("href", "#" + n.id);
B) var linkElem = document.createElement("a"); linkElem.innerHTML = n.innerHTML; linkElem.setAttribute("href")
C) var linkElem = document.createElement("a"); linkElem.innerHTML = n.innerHTML; linkElem.setAttribute("href", "#" + n.id);
D) var linkElem = document.createElement("a"); linkElem.setAttribute("href", "#" + n.id);
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
54
Which of these rules is represented by the rule.type property when its value is 5?

A) @media
B) @font-face
C) unknown
D) style rule
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
55
Identify a true statement about the sheet. parentStyleSheet property .

A) It describes the URL of the style sheet file or an empty text string for an embedded style sheet.
B) It describes the style sheet object containing the style sheet inserted via the @ import rule.
C) It describes the object collection of style rules within the style sheet.
D) It describes a Boolean value to indicate whether the style sheet is enabled (false) or disabled (true).
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
56
A value of _____ is returned when the rule.type property describes the @charset rule.

A) 1
B) 2
C) 3
D) 4
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
57
The _____ property describes the embed or link element node that creates a style sheet.

A) sheet.elementnode
B) sheet.rootnode
C) sheet.ownerNode
D) sheet.attributenode
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
58
Which of these properties describes the URL of a styleSheet file?

A) sheet.media
B) sheet.href
C) sheet.type
D) sheet.title
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
59
In the following HTML code, the object reference document.styleSheets[0].cssRules[1] points to the _____ style rule. h1 {color: red;} h2 {color: blue;} h3 {color: green;} h4 {color: violet;}

A) First, h1 {color: red;}
B) Second, h2 {color: blue;}
C) Third, h3 {color: green;}
D) Fourth, h4 {color: violet;}
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
60
Which of these nodes is absent from a node tree?

A) element node
B) text node
C) comment node
D) attribute node
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
61
Match between columns
The text of the patterns that select the element(s) to be styled for rule
node .nextElementSibling
The text of the patterns that select the element(s) to be styled for rule
node .childElementCount
The text of the patterns that select the element(s) to be styled for rule
node .children.length
The text of the patterns that select the element(s) to be styled for rule
node .lastElementChild
The text of the patterns that select the element(s) to be styled for rule
node .previousElementSibling
The text of the patterns that select the element(s) to be styled for rule
rule .selectorText
The text of the patterns that select the element(s) to be styled for rule
rule. cssText
The text of the patterns that select the element(s) to be styled for rule
rule .style. property
The text of the patterns that select the element(s) to be styled for rule
rule . parentStyleSheet
The text of the patterns that select the element(s) to be styled for rule
rule .parentRule
The immediate sibling element before node
node .nextElementSibling
The immediate sibling element before node
node .childElementCount
The immediate sibling element before node
node .children.length
The immediate sibling element before node
node .lastElementChild
The immediate sibling element before node
node .previousElementSibling
The immediate sibling element before node
rule .selectorText
The immediate sibling element before node
rule. cssText
The immediate sibling element before node
rule .style. property
The immediate sibling element before node
rule . parentStyleSheet
The immediate sibling element before node
rule .parentRule
The contents of rule as a text string (read-only)
node .nextElementSibling
The contents of rule as a text string (read-only)
node .childElementCount
The contents of rule as a text string (read-only)
node .children.length
The contents of rule as a text string (read-only)
node .lastElementChild
The contents of rule as a text string (read-only)
node .previousElementSibling
The contents of rule as a text string (read-only)
rule .selectorText
The contents of rule as a text string (read-only)
rule. cssText
The contents of rule as a text string (read-only)
rule .style. property
The contents of rule as a text string (read-only)
rule . parentStyleSheet
The contents of rule as a text string (read-only)
rule .parentRule
The number of child elements within node
node .nextElementSibling
The number of child elements within node
node .childElementCount
The number of child elements within node
node .children.length
The number of child elements within node
node .lastElementChild
The number of child elements within node
node .previousElementSibling
The number of child elements within node
rule .selectorText
The number of child elements within node
rule. cssText
The number of child elements within node
rule .style. property
The number of child elements within node
rule . parentStyleSheet
The number of child elements within node
rule .parentRule
The value of a style feature within rule
node .nextElementSibling
The value of a style feature within rule
node .childElementCount
The value of a style feature within rule
node .children.length
The value of a style feature within rule
node .lastElementChild
The value of a style feature within rule
node .previousElementSibling
The value of a style feature within rule
rule .selectorText
The value of a style feature within rule
rule. cssText
The value of a style feature within rule
rule .style. property
The value of a style feature within rule
rule . parentStyleSheet
The value of a style feature within rule
rule .parentRule
The final element within node
node .nextElementSibling
The final element within node
node .childElementCount
The final element within node
node .children.length
The final element within node
node .lastElementChild
The final element within node
node .previousElementSibling
The final element within node
rule .selectorText
The final element within node
rule. cssText
The final element within node
rule .style. property
The final element within node
rule . parentStyleSheet
The final element within node
rule .parentRule
The total number of child elements within node
node .nextElementSibling
The total number of child elements within node
node .childElementCount
The total number of child elements within node
node .children.length
The total number of child elements within node
node .lastElementChild
The total number of child elements within node
node .previousElementSibling
The total number of child elements within node
rule .selectorText
The total number of child elements within node
rule. cssText
The total number of child elements within node
rule .style. property
The total number of child elements within node
rule . parentStyleSheet
The total number of child elements within node
rule .parentRule
The style rule containing rule as a parent (read-only)
node .nextElementSibling
The style rule containing rule as a parent (read-only)
node .childElementCount
The style rule containing rule as a parent (read-only)
node .children.length
The style rule containing rule as a parent (read-only)
node .lastElementChild
The style rule containing rule as a parent (read-only)
node .previousElementSibling
The style rule containing rule as a parent (read-only)
rule .selectorText
The style rule containing rule as a parent (read-only)
rule. cssText
The style rule containing rule as a parent (read-only)
rule .style. property
The style rule containing rule as a parent (read-only)
rule . parentStyleSheet
The style rule containing rule as a parent (read-only)
rule .parentRule
The style sheet containing rule (read-only)
node .nextElementSibling
The style sheet containing rule (read-only)
node .childElementCount
The style sheet containing rule (read-only)
node .children.length
The style sheet containing rule (read-only)
node .lastElementChild
The style sheet containing rule (read-only)
node .previousElementSibling
The style sheet containing rule (read-only)
rule .selectorText
The style sheet containing rule (read-only)
rule. cssText
The style sheet containing rule (read-only)
rule .style. property
The style sheet containing rule (read-only)
rule . parentStyleSheet
The style sheet containing rule (read-only)
rule .parentRule
The immediate sibling element after node
node .nextElementSibling
The immediate sibling element after node
node .childElementCount
The immediate sibling element after node
node .children.length
The immediate sibling element after node
node .lastElementChild
The immediate sibling element after node
node .previousElementSibling
The immediate sibling element after node
rule .selectorText
The immediate sibling element after node
rule. cssText
The immediate sibling element after node
rule .style. property
The immediate sibling element after node
rule . parentStyleSheet
The immediate sibling element after node
rule .parentRule
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
62
Jonathan wants to access the last style sheet in the object collection document.styleSheets . Which of the following syntaxes should he use to reference the last style sheet?

A) document.styleSheets [document.styleSheets.length+1]
B) document.styleSheets[length+1]
C) document.styleSheets [document.styleSheets.length-1]
D) document.styleSheets[length-1]
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
63
Match between columns
The style sheet containing rule (read-only)
node .nextElementSibling
The style sheet containing rule (read-only)
node .childElementCount
The style sheet containing rule (read-only)
node .children.length
The style sheet containing rule (read-only)
node .lastElementChild
The style sheet containing rule (read-only)
node .previousElementSibling
The style sheet containing rule (read-only)
rule .selectorText
The style sheet containing rule (read-only)
rule. cssText
The style sheet containing rule (read-only)
rule .style. property
The style sheet containing rule (read-only)
rule . parentStyleSheet
The style sheet containing rule (read-only)
rule .parentRule
The text of the patterns that select the element(s) to be styled for rule
node .nextElementSibling
The text of the patterns that select the element(s) to be styled for rule
node .childElementCount
The text of the patterns that select the element(s) to be styled for rule
node .children.length
The text of the patterns that select the element(s) to be styled for rule
node .lastElementChild
The text of the patterns that select the element(s) to be styled for rule
node .previousElementSibling
The text of the patterns that select the element(s) to be styled for rule
rule .selectorText
The text of the patterns that select the element(s) to be styled for rule
rule. cssText
The text of the patterns that select the element(s) to be styled for rule
rule .style. property
The text of the patterns that select the element(s) to be styled for rule
rule . parentStyleSheet
The text of the patterns that select the element(s) to be styled for rule
rule .parentRule
The total number of child elements within node
node .nextElementSibling
The total number of child elements within node
node .childElementCount
The total number of child elements within node
node .children.length
The total number of child elements within node
node .lastElementChild
The total number of child elements within node
node .previousElementSibling
The total number of child elements within node
rule .selectorText
The total number of child elements within node
rule. cssText
The total number of child elements within node
rule .style. property
The total number of child elements within node
rule . parentStyleSheet
The total number of child elements within node
rule .parentRule
The number of child elements within node
node .nextElementSibling
The number of child elements within node
node .childElementCount
The number of child elements within node
node .children.length
The number of child elements within node
node .lastElementChild
The number of child elements within node
node .previousElementSibling
The number of child elements within node
rule .selectorText
The number of child elements within node
rule. cssText
The number of child elements within node
rule .style. property
The number of child elements within node
rule . parentStyleSheet
The number of child elements within node
rule .parentRule
The contents of rule as a text string (read-only)
node .nextElementSibling
The contents of rule as a text string (read-only)
node .childElementCount
The contents of rule as a text string (read-only)
node .children.length
The contents of rule as a text string (read-only)
node .lastElementChild
The contents of rule as a text string (read-only)
node .previousElementSibling
The contents of rule as a text string (read-only)
rule .selectorText
The contents of rule as a text string (read-only)
rule. cssText
The contents of rule as a text string (read-only)
rule .style. property
The contents of rule as a text string (read-only)
rule . parentStyleSheet
The contents of rule as a text string (read-only)
rule .parentRule
The immediate sibling element after node
node .nextElementSibling
The immediate sibling element after node
node .childElementCount
The immediate sibling element after node
node .children.length
The immediate sibling element after node
node .lastElementChild
The immediate sibling element after node
node .previousElementSibling
The immediate sibling element after node
rule .selectorText
The immediate sibling element after node
rule. cssText
The immediate sibling element after node
rule .style. property
The immediate sibling element after node
rule . parentStyleSheet
The immediate sibling element after node
rule .parentRule
The value of a style feature within rule
node .nextElementSibling
The value of a style feature within rule
node .childElementCount
The value of a style feature within rule
node .children.length
The value of a style feature within rule
node .lastElementChild
The value of a style feature within rule
node .previousElementSibling
The value of a style feature within rule
rule .selectorText
The value of a style feature within rule
rule. cssText
The value of a style feature within rule
rule .style. property
The value of a style feature within rule
rule . parentStyleSheet
The value of a style feature within rule
rule .parentRule
The immediate sibling element before node
node .nextElementSibling
The immediate sibling element before node
node .childElementCount
The immediate sibling element before node
node .children.length
The immediate sibling element before node
node .lastElementChild
The immediate sibling element before node
node .previousElementSibling
The immediate sibling element before node
rule .selectorText
The immediate sibling element before node
rule. cssText
The immediate sibling element before node
rule .style. property
The immediate sibling element before node
rule . parentStyleSheet
The immediate sibling element before node
rule .parentRule
The final element within node
node .nextElementSibling
The final element within node
node .childElementCount
The final element within node
node .children.length
The final element within node
node .lastElementChild
The final element within node
node .previousElementSibling
The final element within node
rule .selectorText
The final element within node
rule. cssText
The final element within node
rule .style. property
The final element within node
rule . parentStyleSheet
The final element within node
rule .parentRule
The style rule containing rule as a parent (read-only)
node .nextElementSibling
The style rule containing rule as a parent (read-only)
node .childElementCount
The style rule containing rule as a parent (read-only)
node .children.length
The style rule containing rule as a parent (read-only)
node .lastElementChild
The style rule containing rule as a parent (read-only)
node .previousElementSibling
The style rule containing rule as a parent (read-only)
rule .selectorText
The style rule containing rule as a parent (read-only)
rule. cssText
The style rule containing rule as a parent (read-only)
rule .style. property
The style rule containing rule as a parent (read-only)
rule . parentStyleSheet
The style rule containing rule as a parent (read-only)
rule .parentRule
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
64
Case-Based Critical Thinking Questions Case 12-4 Jonathan has created a web document and has included multiple stylesheets in it. He wants to access details of the stylesheets included in the web document using stylesheet properties. Which of the following properties will provide Jonathan with the exact number of stylesheets loaded into the web document?

A) document.styleSheets.length
B) document.styleSheets.size
C) document.styleSheets.title
D) document.styleSheets.number
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
65
Case-Based Critical Thinking Questions Case 12-2 Samantha has been asked by her university to create a website that contains a list of all the subjects that the students in Computer Science and Information Science can take up during each semester in college. She wants to create a nested list that will contain an h1 heading level for a student's chosen subject stream, h2 heading level for the semester number, h3 heading level for the name of the subject, and h4 heading level for its subdivisions. Which of the following rules must Samantha use to determine the insertion of a sub division of a subject right after the subject is inserted into the list?

A) The sub-division of the subject will simply be appended to the current ordered list.
B) The sub-division of the subject will be placed in a new ordered list that is nested within the current ordered list.
C) The sub-division of the subject will be appended to the corresponding ordered list higher up in the table of contents
D) The sub-division of the subject can be placed anywhere in the list as long as it is mentioned.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
66
Match between columns
Premises:
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The number of child elements within node
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The style sheet containing rule (read-only)
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The immediate sibling element after node
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The style rule containing rule as a parent (read-only)
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The total number of child elements within node
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The value of a style feature within rule
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The contents of rule as a text string (read-only)
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The immediate sibling element before node
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The text of the patterns that select the element(s) to be styled for rule
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
The final element within node
Responses:
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
node .nextElementSibling
node .childElementCount
node .children.length
node .lastElementChild
node .previousElementSibling
rule .selectorText
rule. cssText
rule .style. property
rule . parentStyleSheet
rule .parentRule
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
67
Explain the statement: " Nodes in the node tree have a familial relationship."
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
68
What are calculated styles based on? Explain how the calculated value of a specific style is retrieved.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
69
Explain the hierarchical or tree-like structure of an HTML file with an example.
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
70
Case-Based Critical Thinking Questions Case 12-3 Natasha has created the following nested list: h1 text h1 text h2 text h2 text h3 text h3 text h4 text h1 text Identify the total number of times the parentNode property will be applied if Natasha wants to move from the h4 heading level to the h1 heading level.

A) 3
B) 4
C) 6
D) 8
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
71
Case-Based Critical Thinking Questions Case 12-2 Samantha has been asked by her university to create a website that contains a list of all the subjects that the students in Computer Science and Information Science can take up during each semester in college. She wants to create a nested list that will contain an h1 heading level for a student's chosen subject stream, h2 heading level for the semester number, h3 heading level for the name of the subject, and h4 heading level for its subdivisions. While creating the nested list, Samantha has to include Computer Science as a new list item. Identify the level of the newly inserted item.

A) 0
B) 1
C) 2
D) 3
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
72
Case-Based Critical Thinking Questions Case 12-1 Consider the following code that Wilson has written in HTML: Historic Documents Dept. of History The constitution online. Identify the value that the node.nodeType property will return for the "Dept. of History" node.

A) 1
B) 2
C) 3
D) 9
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
73
Case-Based Critical Thinking Questions Case 12-3 Natasha has created the following nested list: h1 text h1 text h2 text h2 text h3 text h3 text h4 text h1 text Natasha wants to add a new entry to the accompanying list, which requires her moving from the h3 heading level to the h1 heading level. Identify the number of levels Natasha needs to traverse to add the new entry to the list.

A) 4
B) 3
C) 2
D) 0
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
74
Case-Based Critical Thinking Questions Case 12-5 William has created the following style sheet rule for his website. h1 {color: violet;} h2 {color: yellow;} h3 {color: black;} h4 {color: blue;} Which of the following syntaxes must William apply to the style sheet to remove the color violet completely from the website?

A) sheet .deleteRule( 0 )
B) document.deleteRule(0)
C) sheet .deleteRule( 1 )
D) document.deleteRule(1)
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
75
Case-Based Critical Thinking Questions Case 12-5 William has created the following style sheet rule for his website. h1 {color: violet;} h2 {color: yellow;} h3 {color: black;} h4 {color: blue;} While creating the website, William wants to add a new style sheet rule to the code. h3 { color: magenta; } Identify the correct syntax for adding the style as the fifth rule in the accompanying code.

A) document.styleSheets[0].insertRule("h3 {color: magenta;}", 4);
B) document.styleSheets.insertRule[1]("h3 {color: magenta;}", 5);
C) document.insertRule[0]("h3 {color: magenta;}", 4);
D) document.insertRule[1].StyleSheets("h3 {color: magenta;}", 5);
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
76
Case-Based Critical Thinking Questions Case 12-1 Consider the following code that Wilson has written in HTML: Historic Documents Dept. of History The constitution online. Identify the headLevel value for the element node "Dept. of History".

A) 0
B) 1
C) 2
D) 3
Unlock Deck
Unlock for access to all 76 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 76 flashcards in this deck.