WGU D276 WEB DEVELOPMENT FOUNDATIONS
Comprehensive Practice Examination – 126 Questions
\Original Questions with Detailed RATIONALE s All
correct answers are highlighted in bold green.
SECTION 1: HTML FUNDAMENTALS (1–25)
QUESTION 1
Which HTML tag is used to define the largest, most important heading on a
webpage?
A) <heading>
B) <h6>
C) <h1>
D) <title>
RATIONALE : The <h1> tag defines the most important heading, typically the
main title of the page. <h6> is the smallest heading. <heading> is not a valid HTML
tag. <title> defines the document title in the browser tab.
QUESTION 2
What is the correct HTML element for inserting a line break within a paragraph?
A) <lb>
B) <br>
C) <break>
D) <hr>
RATIONALE : <br> (break) inserts a single line break. <hr> inserts a horizontal
rule (a thematic break with a line). <lb> and <break> are not valid HTML tags.
,QUESTION 3
Which attribute is required on an <img> tag for accessibility and valid HTML?
A) title
B) alt
C) src
D) width
RATIONALE : The alt attribute provides alternative text for screen readers
and is displayed if the image fails to load. While src is technically required to
specify the image source, alt is specifically required for accessibility standards.
QUESTION 4
Which HTML5 semantic element is used to define the top section of a webpage,
typically containing the logo, site title, and main navigation?
A) <nav>
B) <head>
C) <header>
D) <top>
RATIONALE : <header> represents introductory content or a group of
navigational links. <nav> is for major navigation blocks. <head> is the document
metadata container (not visible). <top> is not a valid HTML tag.
QUESTION 5
What is the correct HTML for creating a hyperlink that opens in a new browser
tab?
A) <a href="url" new="true">Link</a>
B) <a href="url" target="_blank">Link</a>
C) <a href="url" target="_blank">Link</a>
D) <a href="url" window="new">Link</a>
, RATIONALE : The target="_blank" attribute opens the link in a new tab or
window. target="_new" is not a standard value. Other attributes are non-
standard.
QUESTION 6
Which HTML element is used to define a table row?
A) <td>
B) <th>
C) <tr>
D) <table>
RATIONALE : <tr> (table row) defines a row in an HTML table. <td> defines a
standard data cell. <th> defines a header cell. <table> is the container for the
entire table.
QUESTION 7
What does the <meta charset="UTF-8"> tag specify?
A) The page's title
B) The character encoding for the HTML document
C) The author of the webpage
D) The viewport settings
RATIONALE : The charset meta tag tells the browser how to interpret the
characters in the document. UTF-8 supports most characters from all languages.
Viewport is set with <meta name="viewport">.
QUESTION 8
Which HTML tag is used to create an unordered (bulleted) list?
A) <ol>
B) <list>
, C) <ul>
D) <li>
RATIONALE : <ul> (unordered list) creates a bulleted list. <ol> (ordered list)
creates a numbered list. <li> is the list item element, used inside
both <ul> and <ol>.
QUESTION 9
Which of the following is the correct way to nest HTML elements?
A) <p><strong>Hello</p></strong>
B) <p><strong>Hello</strong></p>
C) <strong><p>Hello</strong></p>
D) <p><strong>Hello</p> (strong not closed)
RATIONALE : HTML elements must be properly nested; the last opened tag
should be the first closed. In option B, <strong> is opened and closed inside <p>,
which is correct.
QUESTION 10
Which HTML5 semantic element is used to define a self-contained piece of
content, such as a blog post or news article?
A) <section>
B) <div>
C) <article>
D) <aside>
RATIONALE : <article> represents a self-contained composition that could be
independently distributed. <section> is a thematic grouping. <aside> is for
tangentially related content. <div> is a non-semantic container.
QUESTION 11
Comprehensive Practice Examination – 126 Questions
\Original Questions with Detailed RATIONALE s All
correct answers are highlighted in bold green.
SECTION 1: HTML FUNDAMENTALS (1–25)
QUESTION 1
Which HTML tag is used to define the largest, most important heading on a
webpage?
A) <heading>
B) <h6>
C) <h1>
D) <title>
RATIONALE : The <h1> tag defines the most important heading, typically the
main title of the page. <h6> is the smallest heading. <heading> is not a valid HTML
tag. <title> defines the document title in the browser tab.
QUESTION 2
What is the correct HTML element for inserting a line break within a paragraph?
A) <lb>
B) <br>
C) <break>
D) <hr>
RATIONALE : <br> (break) inserts a single line break. <hr> inserts a horizontal
rule (a thematic break with a line). <lb> and <break> are not valid HTML tags.
,QUESTION 3
Which attribute is required on an <img> tag for accessibility and valid HTML?
A) title
B) alt
C) src
D) width
RATIONALE : The alt attribute provides alternative text for screen readers
and is displayed if the image fails to load. While src is technically required to
specify the image source, alt is specifically required for accessibility standards.
QUESTION 4
Which HTML5 semantic element is used to define the top section of a webpage,
typically containing the logo, site title, and main navigation?
A) <nav>
B) <head>
C) <header>
D) <top>
RATIONALE : <header> represents introductory content or a group of
navigational links. <nav> is for major navigation blocks. <head> is the document
metadata container (not visible). <top> is not a valid HTML tag.
QUESTION 5
What is the correct HTML for creating a hyperlink that opens in a new browser
tab?
A) <a href="url" new="true">Link</a>
B) <a href="url" target="_blank">Link</a>
C) <a href="url" target="_blank">Link</a>
D) <a href="url" window="new">Link</a>
, RATIONALE : The target="_blank" attribute opens the link in a new tab or
window. target="_new" is not a standard value. Other attributes are non-
standard.
QUESTION 6
Which HTML element is used to define a table row?
A) <td>
B) <th>
C) <tr>
D) <table>
RATIONALE : <tr> (table row) defines a row in an HTML table. <td> defines a
standard data cell. <th> defines a header cell. <table> is the container for the
entire table.
QUESTION 7
What does the <meta charset="UTF-8"> tag specify?
A) The page's title
B) The character encoding for the HTML document
C) The author of the webpage
D) The viewport settings
RATIONALE : The charset meta tag tells the browser how to interpret the
characters in the document. UTF-8 supports most characters from all languages.
Viewport is set with <meta name="viewport">.
QUESTION 8
Which HTML tag is used to create an unordered (bulleted) list?
A) <ol>
B) <list>
, C) <ul>
D) <li>
RATIONALE : <ul> (unordered list) creates a bulleted list. <ol> (ordered list)
creates a numbered list. <li> is the list item element, used inside
both <ul> and <ol>.
QUESTION 9
Which of the following is the correct way to nest HTML elements?
A) <p><strong>Hello</p></strong>
B) <p><strong>Hello</strong></p>
C) <strong><p>Hello</strong></p>
D) <p><strong>Hello</p> (strong not closed)
RATIONALE : HTML elements must be properly nested; the last opened tag
should be the first closed. In option B, <strong> is opened and closed inside <p>,
which is correct.
QUESTION 10
Which HTML5 semantic element is used to define a self-contained piece of
content, such as a blog post or news article?
A) <section>
B) <div>
C) <article>
D) <aside>
RATIONALE : <article> represents a self-contained composition that could be
independently distributed. <section> is a thematic grouping. <aside> is for
tangentially related content. <div> is a non-semantic container.
QUESTION 11