COMP 126 FINAL with correct questions and
answers 2025/2026.
A CSS formatting rule consists of what two parts - correct answers selector and declaration
A CSS grid container consists of grid items - correct answers that consist of one or more grid
cells
A flex container can contain one or more - correct answers flex items
A scalable image is scaled - correct answers to the width of the element that contains it
A vertical navigation menu is best coded as - correct answers a series of <a> elements within the
li elements of an unordered list
By default, an ordered list is displayed as - correct answers a numbered list
By default, items in a flex container are displayed - correct answers horizontally from left to right
CSS stands for - correct answers Cascading Style Sheet
Flexbox allows you to lay out elements side by side... - correct answers without using floats
, How can you easily view the code behind a website that you find online? - correct answers use
the developer's tools in your browser
How do element behave in what we call the "normal (or natural) flow of the document"? -
correct answers They flow left to right and top to bottom
How many levels of heading does HTML include by default? - correct answers 6
HTML and CSS are a collection of - correct answers Web Standards
HTML is used to define the - correct answers structure and content of a webpage
If I want the fill color of an <a> element to change to red when the user's cursor is positioned
over it, which of the following rules could I use? - correct answers a:hover {background: red;}
If the following CSS appears in a stylesheet, what color will the associated <h1> appear?
h1, h2, h3 {color: red; font-size: 36px;}
h3 {font-size: 24px;}
h1 {color: blue;} - correct answers blue
If two CSS declarations conflict, which declarations override the other declarations/ have the
highest priority? - correct answers !important declarations in the user's style sheet
If you don't explicitly set a value for the position property of an element, what value will it
have? - correct answers position: static;
answers 2025/2026.
A CSS formatting rule consists of what two parts - correct answers selector and declaration
A CSS grid container consists of grid items - correct answers that consist of one or more grid
cells
A flex container can contain one or more - correct answers flex items
A scalable image is scaled - correct answers to the width of the element that contains it
A vertical navigation menu is best coded as - correct answers a series of <a> elements within the
li elements of an unordered list
By default, an ordered list is displayed as - correct answers a numbered list
By default, items in a flex container are displayed - correct answers horizontally from left to right
CSS stands for - correct answers Cascading Style Sheet
Flexbox allows you to lay out elements side by side... - correct answers without using floats
, How can you easily view the code behind a website that you find online? - correct answers use
the developer's tools in your browser
How do element behave in what we call the "normal (or natural) flow of the document"? -
correct answers They flow left to right and top to bottom
How many levels of heading does HTML include by default? - correct answers 6
HTML and CSS are a collection of - correct answers Web Standards
HTML is used to define the - correct answers structure and content of a webpage
If I want the fill color of an <a> element to change to red when the user's cursor is positioned
over it, which of the following rules could I use? - correct answers a:hover {background: red;}
If the following CSS appears in a stylesheet, what color will the associated <h1> appear?
h1, h2, h3 {color: red; font-size: 36px;}
h3 {font-size: 24px;}
h1 {color: blue;} - correct answers blue
If two CSS declarations conflict, which declarations override the other declarations/ have the
highest priority? - correct answers !important declarations in the user's style sheet
If you don't explicitly set a value for the position property of an element, what value will it
have? - correct answers position: static;