[WGU C777 OBJECTIVE ASSESSMENT] – QUESTIONS
AND ANSWERS | VERIFIED AND WELL DETAILED
ANSWERS | PLUS RATIONALES | GUARANTEED
PASS | LATEST EXAM UPDATE | STUVIA VERIFIED |
EXAM PREP | STUDY GUIDE | PRACTICE TEST
1. Which HTML element is used to define the main content area of a webpage?
A. <section>
B. <article>
C. <main>
D. <content>
Correct Answer: C. <main>
Rationale:
The <main> element identifies the primary content of the webpage and improves semantic
structure and accessibility.
2. Which CSS property controls the text size of an element?
A. text-style
B. font-size
C. text-size
D. font-weight
Correct Answer: B. font-size
Rationale:
The font-size property specifies the size of text displayed within an element.
3. What is the correct syntax for linking an external CSS file?
A. <css src="style.css">
B. <style href="style.css">
C. <link rel="stylesheet" href="style.css">
D. <stylesheet>style.css</stylesheet>
Correct Answer: C. <link rel="stylesheet" href="style.css">
Rationale:
The link element with rel="stylesheet" correctly attaches an external CSS file to an HTML
document.
, 4. Which JavaScript keyword declares a block-scoped variable?
A. var
B. define
C. static
D. let
Correct Answer: D. let
Rationale:
The let keyword creates a block-scoped variable, improving control over variable scope.
5. Which HTTP status code indicates a page was not found?
A. 200
B. 301
C. 403
D. 404
Correct Answer: D. 404
Rationale:
The 404 status code informs the browser that the requested resource could not be located.
6. Which HTML attribute provides alternative text for images?
A. title
B. alt
C. src
D. aria-label
Correct Answer: B. alt
Rationale:
The alt attribute improves accessibility by describing the image for screen readers and failed
image loads.
7. Which CSS layout model is primarily designed for one-dimensional layouts?
A. Grid
B. Float
C. Flexbox
D. Positioning
Correct Answer: C. Flexbox
Rationale:
Flexbox is optimized for arranging items in either rows or columns within a container.
, 8. What does DOM stand for?
A. Document Object Model
B. Data Object Management
C. Dynamic Output Method
D. Document Orientation Model
Correct Answer: A. Document Object Model
Rationale:
The DOM represents webpage elements as objects that JavaScript can manipulate.
9. Which JavaScript method writes content to the browser console?
A. print()
B. log.console()
C. console.log()
D. write.console()
Correct Answer: C. console.log()
Rationale:
console.log() is commonly used for debugging and displaying information in developer tools.
10. Which HTML element is used for the largest heading?
A. <h6>
B. <heading>
C. <head>
D. <h1>
Correct Answer: D. <h1>
Rationale:
The <h1> element represents the highest-level heading in HTML.
11. Which CSS property changes the background color of an element?
A. color
B. background-color
C. bg-color
D. background-style
Correct Answer: B. background-color
Rationale:
The background-color property specifies the background color applied to an element.
12. Which symbol is used for comments in CSS?
A. // comment
, B. <!-- -->
C. ## comment
D. /* comment */
Correct Answer: D. /* comment */
Rationale:
CSS comments are enclosed between / and / symbols.
13. Which JavaScript function converts a string to an integer?
A. Integer()
B. parseInt()
C. toNumber()
D. convertInt()
Correct Answer: B. parseInt()
Rationale:
parseInt() converts a string value into an integer when possible.
14. Which HTML element creates a numbered list?
A. <ul>
B. <list>
C. <ol>
D. <dl>
Correct Answer: C. <ol>
Rationale:
The <ol> element creates an ordered list with sequential numbering.
15. Which CSS property controls spacing inside an element border?
A. margin
B. spacing
C. padding
D. border-space
Correct Answer: C. padding
Rationale:
Padding defines the space between an element’s content and its border.
16. What is the purpose of responsive web design?
A. Increase server storage
B. Improve database speed
AND ANSWERS | VERIFIED AND WELL DETAILED
ANSWERS | PLUS RATIONALES | GUARANTEED
PASS | LATEST EXAM UPDATE | STUVIA VERIFIED |
EXAM PREP | STUDY GUIDE | PRACTICE TEST
1. Which HTML element is used to define the main content area of a webpage?
A. <section>
B. <article>
C. <main>
D. <content>
Correct Answer: C. <main>
Rationale:
The <main> element identifies the primary content of the webpage and improves semantic
structure and accessibility.
2. Which CSS property controls the text size of an element?
A. text-style
B. font-size
C. text-size
D. font-weight
Correct Answer: B. font-size
Rationale:
The font-size property specifies the size of text displayed within an element.
3. What is the correct syntax for linking an external CSS file?
A. <css src="style.css">
B. <style href="style.css">
C. <link rel="stylesheet" href="style.css">
D. <stylesheet>style.css</stylesheet>
Correct Answer: C. <link rel="stylesheet" href="style.css">
Rationale:
The link element with rel="stylesheet" correctly attaches an external CSS file to an HTML
document.
, 4. Which JavaScript keyword declares a block-scoped variable?
A. var
B. define
C. static
D. let
Correct Answer: D. let
Rationale:
The let keyword creates a block-scoped variable, improving control over variable scope.
5. Which HTTP status code indicates a page was not found?
A. 200
B. 301
C. 403
D. 404
Correct Answer: D. 404
Rationale:
The 404 status code informs the browser that the requested resource could not be located.
6. Which HTML attribute provides alternative text for images?
A. title
B. alt
C. src
D. aria-label
Correct Answer: B. alt
Rationale:
The alt attribute improves accessibility by describing the image for screen readers and failed
image loads.
7. Which CSS layout model is primarily designed for one-dimensional layouts?
A. Grid
B. Float
C. Flexbox
D. Positioning
Correct Answer: C. Flexbox
Rationale:
Flexbox is optimized for arranging items in either rows or columns within a container.
, 8. What does DOM stand for?
A. Document Object Model
B. Data Object Management
C. Dynamic Output Method
D. Document Orientation Model
Correct Answer: A. Document Object Model
Rationale:
The DOM represents webpage elements as objects that JavaScript can manipulate.
9. Which JavaScript method writes content to the browser console?
A. print()
B. log.console()
C. console.log()
D. write.console()
Correct Answer: C. console.log()
Rationale:
console.log() is commonly used for debugging and displaying information in developer tools.
10. Which HTML element is used for the largest heading?
A. <h6>
B. <heading>
C. <head>
D. <h1>
Correct Answer: D. <h1>
Rationale:
The <h1> element represents the highest-level heading in HTML.
11. Which CSS property changes the background color of an element?
A. color
B. background-color
C. bg-color
D. background-style
Correct Answer: B. background-color
Rationale:
The background-color property specifies the background color applied to an element.
12. Which symbol is used for comments in CSS?
A. // comment
, B. <!-- -->
C. ## comment
D. /* comment */
Correct Answer: D. /* comment */
Rationale:
CSS comments are enclosed between / and / symbols.
13. Which JavaScript function converts a string to an integer?
A. Integer()
B. parseInt()
C. toNumber()
D. convertInt()
Correct Answer: B. parseInt()
Rationale:
parseInt() converts a string value into an integer when possible.
14. Which HTML element creates a numbered list?
A. <ul>
B. <list>
C. <ol>
D. <dl>
Correct Answer: C. <ol>
Rationale:
The <ol> element creates an ordered list with sequential numbering.
15. Which CSS property controls spacing inside an element border?
A. margin
B. spacing
C. padding
D. border-space
Correct Answer: C. padding
Rationale:
Padding defines the space between an element’s content and its border.
16. What is the purpose of responsive web design?
A. Increase server storage
B. Improve database speed