WGU C777 Objective Assessment – Practice Exam with 200
Questions & Answers 2026/2027 PASS 100% UPDATED
Question 1
A developer wants to create a semantic section in an HTML5 document
that contains self-contained content intended to be independently
distributed or reused. Which element should the developer use?
A. <section>
B. <article>
C. <div>
D. <aside>
Correct Answer: B. <article>
Detailed Rationale: The <article> element represents a self-contained
composition in a document, page, application, or site, which is intended
to be independently distributable or reusable (e.g., a forum post,
magazine or newspaper article, or blog entry). A <section> is a thematic
grouping of content, usually with a heading.
Question 2
Which CSS3 property and value combination is used to establish a
flexible container and enable the Flexbox layout model for its children?
A. display: block;
B. display: grid;
C. display: flex;
,D. display: inline-flexbox;
Correct Answer: C. display: flex;
Detailed Rationale: Setting display: flex; on an element defines a flex
container and establishes a flex formatting context for its direct
children, allowing them to be easily aligned and distributed.
Question 3
In JavaScript, which method is used to convert a JavaScript object into a
JSON-formatted string for storage or transmission?
A. JSON.parse()
B. JSON.stringify()
C. JSON.convert()
D. JSON.toObject()
Correct Answer: B. JSON.stringify()
Detailed Rationale: JSON.stringify() converts a JavaScript value/object
into a JSON string. Conversely, JSON.parse() parses a JSON string into a
JavaScript object.
Question 4
Which HTML5 input type includes built-in validation to ensure the user
enters a valid email address format?
A. <input type="text">
B. <input type="mail">
C. <input type="email">
D. <input type="address">
,Correct Answer: C. <input type="email">
Detailed Rationale: The <input type="email"> element is used for
letting the user enter an e-mail address and provides automatic client-
side validation against standard email patterns when the form is
submitted.
Question 5
Which CSS3 property is used to apply a drop shadow effect to text
elements?
A. box-shadow
B. text-shadow
C. font-shadow
D. shadow-effect
Correct Answer: B. text-shadow
Detailed Rationale: The text-shadow property adds shadow to text. It
accepts values for horizontal offset, vertical offset, blur radius, and
color. box-shadow applies a shadow to box elements.
Question 6
When working with the HTML5 Canvas API, which method is used to
obtain a two-dimensional rendering context?
A. canvas.getContext('2d')
B. canvas.createContext('2d')
C. canvas.render('2d')
D. canvas.getRenderer()
, Correct Answer: A. canvas.getContext('2d')
Detailed Rationale: The getContext('2d') method returns a drawing
context on the canvas, or null if the context identifier is not supported
or the canvas has already been drawn on with a different context type.
Question 7
Which JavaScript storage mechanism allows data to persist even after
the browser window or tab is closed?
A. sessionStorage
B. localStorage
C. cookieStorage
D. memoryStorage
Correct Answer: B. localStorage
Detailed Rationale: localStorage allows you to save key/value pairs in a
web browser with no expiration time. The data persists even when the
browser window is closed. sessionStorage clears data when the page
session ends.
Question 8
Which CSS3 pseudo-class selects an element only when the mouse
pointer is hovering over it?
A. :active
B. :focus
C. :hover
D. :visited
Questions & Answers 2026/2027 PASS 100% UPDATED
Question 1
A developer wants to create a semantic section in an HTML5 document
that contains self-contained content intended to be independently
distributed or reused. Which element should the developer use?
A. <section>
B. <article>
C. <div>
D. <aside>
Correct Answer: B. <article>
Detailed Rationale: The <article> element represents a self-contained
composition in a document, page, application, or site, which is intended
to be independently distributable or reusable (e.g., a forum post,
magazine or newspaper article, or blog entry). A <section> is a thematic
grouping of content, usually with a heading.
Question 2
Which CSS3 property and value combination is used to establish a
flexible container and enable the Flexbox layout model for its children?
A. display: block;
B. display: grid;
C. display: flex;
,D. display: inline-flexbox;
Correct Answer: C. display: flex;
Detailed Rationale: Setting display: flex; on an element defines a flex
container and establishes a flex formatting context for its direct
children, allowing them to be easily aligned and distributed.
Question 3
In JavaScript, which method is used to convert a JavaScript object into a
JSON-formatted string for storage or transmission?
A. JSON.parse()
B. JSON.stringify()
C. JSON.convert()
D. JSON.toObject()
Correct Answer: B. JSON.stringify()
Detailed Rationale: JSON.stringify() converts a JavaScript value/object
into a JSON string. Conversely, JSON.parse() parses a JSON string into a
JavaScript object.
Question 4
Which HTML5 input type includes built-in validation to ensure the user
enters a valid email address format?
A. <input type="text">
B. <input type="mail">
C. <input type="email">
D. <input type="address">
,Correct Answer: C. <input type="email">
Detailed Rationale: The <input type="email"> element is used for
letting the user enter an e-mail address and provides automatic client-
side validation against standard email patterns when the form is
submitted.
Question 5
Which CSS3 property is used to apply a drop shadow effect to text
elements?
A. box-shadow
B. text-shadow
C. font-shadow
D. shadow-effect
Correct Answer: B. text-shadow
Detailed Rationale: The text-shadow property adds shadow to text. It
accepts values for horizontal offset, vertical offset, blur radius, and
color. box-shadow applies a shadow to box elements.
Question 6
When working with the HTML5 Canvas API, which method is used to
obtain a two-dimensional rendering context?
A. canvas.getContext('2d')
B. canvas.createContext('2d')
C. canvas.render('2d')
D. canvas.getRenderer()
, Correct Answer: A. canvas.getContext('2d')
Detailed Rationale: The getContext('2d') method returns a drawing
context on the canvas, or null if the context identifier is not supported
or the canvas has already been drawn on with a different context type.
Question 7
Which JavaScript storage mechanism allows data to persist even after
the browser window or tab is closed?
A. sessionStorage
B. localStorage
C. cookieStorage
D. memoryStorage
Correct Answer: B. localStorage
Detailed Rationale: localStorage allows you to save key/value pairs in a
web browser with no expiration time. The data persists even when the
browser window is closed. sessionStorage clears data when the page
session ends.
Question 8
Which CSS3 pseudo-class selects an element only when the mouse
pointer is hovering over it?
A. :active
B. :focus
C. :hover
D. :visited