Michigan Web Developer Specialist Exam
Questions and Correct Answers (Verified
Answers) Plus Rationales 2026 Q&A |
Instant Download Pdf
1. Which HTML element is used to define the main heading of a web
page?
a) <header>
b) <title>
c) <h1>
d) <head>
c) <h1>
Rationale: <h1> represents the main heading of a web page and is
critical for SEO and accessibility. <title> is for the browser tab, <head>
contains metadata, and <header> is a structural section.
2. What does CSS stand for?
a) Computer Style Sheets
b) Cascading Style Sheets
c) Creative Style Syntax
d) Colorful Style Sheets
b) Cascading Style Sheets
Rationale: CSS is used to style HTML content, enabling separation of
,content from presentation. “Cascading” refers to the hierarchical
order of style application.
3. Which attribute is used to provide alternative text for an image?
a) src
b) title
c) alt
d) description
c) alt
Rationale: The alt attribute provides text for screen readers and
displays when the image fails to load. This improves accessibility.
4. Which HTML element is used to create a hyperlink?
a) <link>
b) <a>
c) <href>
d) <url>
b) <a>
Rationale: The <a> tag defines a hyperlink. The href attribute specifies
the URL, but <href> itself is not an element.
5. Which CSS property controls the text size?
a) font-style
b) font-size
c) text-size
d) text-style
b) font-size
Rationale: font-size adjusts the size of text in HTML elements. font-
style is for italic or normal styling.
6. In JavaScript, which keyword is used to declare a constant
variable?
, a) var
b) let
c) const
d) static
c) const
Rationale: const defines a variable whose value cannot be reassigned.
let allows reassignment, and var is function-scoped.
7. Which HTML element is used to embed a video in a webpage?
a) <video>
b) <media>
c) <movie>
d) <embed>
a) <video>
Rationale: <video> is a semantic HTML element for embedding videos.
<embed> is generic for other media but less specific.
8. What does the CSS flex-direction property control?
a) The alignment of text
b) The direction of flex items in a flex container
c) The font style
d) The background color
b) The direction of flex items in a flex container
Rationale: flex-direction determines whether flex items are laid out in
rows, columns, or reversed order.
9. Which JavaScript method converts a JSON string into a JavaScript
object?
a) JSON.stringify()
b) JSON.parse()
, c) JSON.objectify()
d) JSON.convert()
b) JSON.parse()
Rationale: JSON.parse() takes a JSON string and transforms it into a
usable JavaScript object. JSON.stringify() does the reverse.
10. Which HTML tag is used for a numbered list?
a) <ol>
b) <ul>
c) <li>
d) <list>
a) <ol>
Rationale: <ol> creates an ordered (numbered) list, while <ul> creates
an unordered (bulleted) list.
11. What does the z-index property control in CSS?
a) Font size
b) Element stacking order
c) Padding
d) Margin
b) Element stacking order
Rationale: z-index sets the stack order for overlapping elements.
Higher values appear in front of lower ones.
12. Which of the following is NOT a valid JavaScript data type?
a) Number
b) String
c) Boolean
d) Character
Questions and Correct Answers (Verified
Answers) Plus Rationales 2026 Q&A |
Instant Download Pdf
1. Which HTML element is used to define the main heading of a web
page?
a) <header>
b) <title>
c) <h1>
d) <head>
c) <h1>
Rationale: <h1> represents the main heading of a web page and is
critical for SEO and accessibility. <title> is for the browser tab, <head>
contains metadata, and <header> is a structural section.
2. What does CSS stand for?
a) Computer Style Sheets
b) Cascading Style Sheets
c) Creative Style Syntax
d) Colorful Style Sheets
b) Cascading Style Sheets
Rationale: CSS is used to style HTML content, enabling separation of
,content from presentation. “Cascading” refers to the hierarchical
order of style application.
3. Which attribute is used to provide alternative text for an image?
a) src
b) title
c) alt
d) description
c) alt
Rationale: The alt attribute provides text for screen readers and
displays when the image fails to load. This improves accessibility.
4. Which HTML element is used to create a hyperlink?
a) <link>
b) <a>
c) <href>
d) <url>
b) <a>
Rationale: The <a> tag defines a hyperlink. The href attribute specifies
the URL, but <href> itself is not an element.
5. Which CSS property controls the text size?
a) font-style
b) font-size
c) text-size
d) text-style
b) font-size
Rationale: font-size adjusts the size of text in HTML elements. font-
style is for italic or normal styling.
6. In JavaScript, which keyword is used to declare a constant
variable?
, a) var
b) let
c) const
d) static
c) const
Rationale: const defines a variable whose value cannot be reassigned.
let allows reassignment, and var is function-scoped.
7. Which HTML element is used to embed a video in a webpage?
a) <video>
b) <media>
c) <movie>
d) <embed>
a) <video>
Rationale: <video> is a semantic HTML element for embedding videos.
<embed> is generic for other media but less specific.
8. What does the CSS flex-direction property control?
a) The alignment of text
b) The direction of flex items in a flex container
c) The font style
d) The background color
b) The direction of flex items in a flex container
Rationale: flex-direction determines whether flex items are laid out in
rows, columns, or reversed order.
9. Which JavaScript method converts a JSON string into a JavaScript
object?
a) JSON.stringify()
b) JSON.parse()
, c) JSON.objectify()
d) JSON.convert()
b) JSON.parse()
Rationale: JSON.parse() takes a JSON string and transforms it into a
usable JavaScript object. JSON.stringify() does the reverse.
10. Which HTML tag is used for a numbered list?
a) <ol>
b) <ul>
c) <li>
d) <list>
a) <ol>
Rationale: <ol> creates an ordered (numbered) list, while <ul> creates
an unordered (bulleted) list.
11. What does the z-index property control in CSS?
a) Font size
b) Element stacking order
c) Padding
d) Margin
b) Element stacking order
Rationale: z-index sets the stack order for overlapping elements.
Higher values appear in front of lower ones.
12. Which of the following is NOT a valid JavaScript data type?
a) Number
b) String
c) Boolean
d) Character