COMP 126 FINAL EXAM 2025/2026
QUESTIONS AND ANSWERS 100% PASS
What type of HTML element will always by default appear on a new line in the browser? -
ANS block elements
The portion of a web page that must contain all the content to be displayed on the page should
be coded as an HTML5 - ANS <body> element
What is the term we use to describe any item on a web page that can be distinguished via
HTML tags? - ANS element
HTML is used to define the - ANS structure and content of a webpage
How many levels of heading does HTML include by default? - ANS 6
The <title> element in the <head> section of an HTML document specifies the text -
ANS that's displayed in the browser's tab for the page
How can you easily view the code behind a website that you find online? - ANS use the
developer's tools in your browser
1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
, The div element should only be used - ANS when the existing HTML5 structural-semantic
elements don't apply
Which of the following is an inline element by default? - ANS <span></span>
Which of the following is the best choice to tag the header area in HTML, that is, the very top of
a website where users can typically find the name and logo of that site, among other things? -
ANS <header></header>
Which of the following selectors indicate a CSS rule that should apply to all instances of the <p>
element that are located inside a <nav> element on a webpage? - ANS nav p {}
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? - ANS a:hover {background: red;}
Which of the follow selectors is most specific? (.nav, #nav, a, div) - ANS #nav (IDs are the
most specific)
In the box model for an element, the border - ANS is between the padding and the margin
Psuedo-class selectors let you apply formatting - ANS to the element in specific states or
conditions
If two CSS declarations conflict, which declarations override the other declarations/ have the
highest priority? - ANS !important declarations in the user's style sheet
The following code: padding .5em 0 .25em; applies padding to an element: - ANS .5em top, 0
left and right, and .25em bottom
2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
QUESTIONS AND ANSWERS 100% PASS
What type of HTML element will always by default appear on a new line in the browser? -
ANS block elements
The portion of a web page that must contain all the content to be displayed on the page should
be coded as an HTML5 - ANS <body> element
What is the term we use to describe any item on a web page that can be distinguished via
HTML tags? - ANS element
HTML is used to define the - ANS structure and content of a webpage
How many levels of heading does HTML include by default? - ANS 6
The <title> element in the <head> section of an HTML document specifies the text -
ANS that's displayed in the browser's tab for the page
How can you easily view the code behind a website that you find online? - ANS use the
developer's tools in your browser
1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
, The div element should only be used - ANS when the existing HTML5 structural-semantic
elements don't apply
Which of the following is an inline element by default? - ANS <span></span>
Which of the following is the best choice to tag the header area in HTML, that is, the very top of
a website where users can typically find the name and logo of that site, among other things? -
ANS <header></header>
Which of the following selectors indicate a CSS rule that should apply to all instances of the <p>
element that are located inside a <nav> element on a webpage? - ANS nav p {}
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? - ANS a:hover {background: red;}
Which of the follow selectors is most specific? (.nav, #nav, a, div) - ANS #nav (IDs are the
most specific)
In the box model for an element, the border - ANS is between the padding and the margin
Psuedo-class selectors let you apply formatting - ANS to the element in specific states or
conditions
If two CSS declarations conflict, which declarations override the other declarations/ have the
highest priority? - ANS !important declarations in the user's style sheet
The following code: padding .5em 0 .25em; applies padding to an element: - ANS .5em top, 0
left and right, and .25em bottom
2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED