WGU C777 Web Development Applications
Exam 2026/2027 Actual Exam | 100%
Correct Answers with Detailed Rationales |
Pass Guaranteed - A+ Graded
Section 1: HTML5 and Semantic Markup (20 Questions)
Q1: Which HTML5 element is used to define navigation links?
A. <nav> [CORRECT]
B. <header>
C. <footer>
D. <section>
Correct Answer: A
Rationale: The <nav> element defines a set of navigation links. The <header> element represents
introductory content, <footer> represents footer content, and <section> defines a thematic
grouping of content. Semantic HTML improves accessibility and SEO.
Q2: Which HTML5 element is most appropriate for the main content of a document?
A. <div id="main">
B. <main> [CORRECT]
C. <article>
D. <section>
Correct Answer: B
Rationale: The <main> element specifies the main content of a document, and there should be
only one per page. While <article> and <section> are semantic, they don't specifically indicate
main content. <div> is non-semantic and should be avoided when semantic alternatives exist.
Q3: Which attribute is required for the <img> tag to be valid HTML5?
A. title
B. alt [CORRECT]
C. src [CORRECT]
,2
D. Both B and C [CORRECT]
Correct Answer: D
Rationale: Both src (specifies image path) and alt (provides alternative text for accessibility) are
required for valid, accessible HTML5. The title attribute is optional and provides advisory
information. While HTML5 validators may not strictly enforce alt for all cases, it's required for
accessibility compliance.
Q4: Which HTML5 element should be used to mark up a blog post?
A. <div class="blog">
B. <article> [CORRECT]
C. <section>
D. <aside>
Correct Answer: B
Rationale: The <article> element represents a self-contained composition that could be
independently distributed or reused, such as a blog post, news story, or forum post. <section> is
for thematic grouping, <aside> for tangentially related content, and <div> is non-semantic.
Q5: What is the purpose of the <figure> and <figcaption> elements?
A. To create image galleries
B. To group media content with a caption [CORRECT]
C. To define background images
D. To create responsive images
Correct Answer: B
Rationale: <figure> groups self-contained content (images, diagrams, code snippets) with an
optional <figcaption> for the caption. This semantic relationship helps screen readers and
assistive technologies understand that the caption describes the content.
Q6: Which HTML5 attribute specifies that an input field must be filled out before submitting the
form?
A. required [CORRECT]
B. placeholder
C. pattern
D. validate
,3
Correct Answer: A
Rationale: The boolean required attribute makes a form field mandatory. placeholder shows hint
text, pattern specifies a regex pattern for validation, and validate is not a standard HTML
attribute. HTML5 validation occurs before form submission.
Q7: Which element is appropriate for marking up the publication date of an article?
A. <date>
B. <time> [CORRECT]
C. <datetime>
D. <pubdate>
Correct Answer: B
Rationale: The <time> element represents a specific period in time, with an optional datetime
attribute for machine-readable format: <time datetime="2024-01-15">January 15, 2024</time>.
<date> and <pubdate> are not HTML5 elements.
Q8: What does the <details> element create?
A. A dropdown menu
B. A disclosure widget that users can open/close [CORRECT]
C. A modal dialog
D. A tooltip
Correct Answer: B
Rationale: <details> creates an interactive disclosure widget that users can expand/collapse,
typically used with <summary> for the visible heading. This is native HTML5 functionality
without JavaScript. It's not for dropdowns (use <select>), modals (use <dialog>), or tooltips.
Q9: Which attribute makes a form input field accept only email addresses?
A. type="email" [CORRECT]
B. pattern="email"
C. format="email"
D. validate="email"
Correct Answer: A
, 4
Rationale: type="email" provides built-in email format validation and displays an appropriate
keyboard on mobile devices. While pattern can be used for custom validation, type="email" is
the semantic, accessible solution. The other attributes don't exist in HTML5.
Q10: Which HTML5 element defines contact information for the author/owner of a document or
article?
A. <contact>
B. <address> [CORRECT]
C. <author>
D. <info>
Correct Answer: B
Rationale: <address> provides contact information for the nearest <article> or <body> ancestor.
It should not be used for arbitrary addresses (use <p> for physical addresses). <contact> and
<author> are not HTML5 elements.
Q11: What is the purpose of the data-* attribute in HTML5?
A. To store private data for the page
B. To store custom data private to the page or application [CORRECT]
C. To encrypt sensitive information
D. To link to external databases
Correct Answer: B
Rationale: data-* attributes allow embedding custom data attributes on HTML elements for
JavaScript access without affecting rendering. Example: <div data-user-id="123" data-
role="admin">. They are not for encryption or database linking.
Q12: Which element should wrap the primary navigation links of a website?
A. <menu>
B. <nav> [CORRECT]
C. <navigation>
D. <links>
Correct Answer: B