WGU Web-Development-Applications Exam Questions
WGU Web Development Applications (KVO1) (Page 3 )

Updated On: 27-Feb-2026

A web developer need to ensure that a message appears if the user's browser does not support the audio files on a web page.

How should this designer code the audio element?

A)



B)



C)



D)

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): D

Explanation:

To ensure that a message appears if the user's browser does not support the audio files on a web page, the developer should use the <audio> element correctly. The <audio> element supports fallback content, which is displayed if the browser does not support the specified audio formats.

Correct Usage:

Fallback Content: Place the message as fallback content inside the <audio> element. Browsers that do not support the audio format will display this message.

Example:

<audio>

<source src="audio/song.mp3" type="audio/mpeg" />

No mpeg support.

</audio>

Explanation of Options:

Option A: Incorrect. The alt attribute is not valid for the <source> element.

Option B: Incorrect. The alt attribute is not valid for the <audio> element.

Option C: Incorrect. The alt attribute is used incorrectly in the <audio> element.

Option D: Correct. The message "No mpeg support." is placed correctly as fallback content inside the <audio> element.


Reference:

W3C HTML5 Specification - The audio element

MDN Web Docs - <audio>

Using the fallback content inside the <audio> element ensures that users with unsupported browsers receive a meaningful message, improving the overall user experience.



Given the following HTML code:



Which line of code should replace the first line to ensure that users can pause and restart the video?

A)



B)



C)



D)

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): C

Explanation:

To ensure that users can pause and restart the video, the controls attribute needs to be added to the <video> tag. This attribute provides the user with controls to play, pause, and adjust the volume of the video. The correct line of code that should replace the first line in the provided HTML to achieve this functionality is:

<video width="360" height="270" controls>

Here's the comprehensive explanation:

controls Attribute: The controls attribute is a boolean attribute.
When present, it specifies that video controls should be displayed, allowing the user to control video playback, including pausing, playing, and seeking.

HTML Structure:

Original Line:

<video width="360" height="270">

Revised Line:

<video width="360" height="270" controls>

Usage Example:

<video width="360" height="270" controls>

<source src="video.mp4" type="video/mp4">

Your browser does not support the HTML5 video element.

</video>

In this example, adding the controls attribute provides the user with play, pause, and volume controls.


Reference:

MDN Web Docs on <video>

W3C HTML5 Specification on <video>



Given the following CSS code:



Which type of selector is used?

  1. Group
  2. Class
  3. Element
  4. ID

Answer(s): D

Explanation:

The given CSS code uses the #name selector, which is an ID selector. The ID selector is used to style an element with a specific id attribute.

ID Selector: In CSS, the ID selector is used to style the element with the specific id. The syntax for the ID selector is #id, where id is the id attribute value of the HTML element.

Usage Example:

#name {

text-align: left;

}

This CSS rule will apply the text-align: left; style to the element with id="name".

ID Selector Characteristics:

An ID must be unique within a document, meaning it can be used only once per page.

ID selectors are more specific than class selectors and element selectors.

Example in HTML:

<div id="name">This is a div with ID "name".</div>


Reference:

MDN Web Docs on CSS Selectors

W3C CSS Specification on Selectors



Given the following CSS code:



Which portion is the rule?

A)



B)



C)



D)

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): A

Explanation:

In CSS, a rule is composed of a selector and a declaration block. The rule is the entire part that defines how styles should be applied to elements matching the selector.

CSS Rule Components:

Selector: Identifies the HTML elements to be styled (e.g., body, .name, #item).

Declaration Block: Contains one or more declarations, each consisting of a property and a value, enclosed in curly braces {}.

Example Analysis:

Option A:

body {

background-color: white;

}

This is the full rule, consisting of the selector body and the declaration block { background-color:
white; }.

Option B:

background-color: white;

This is just a declaration, not a complete rule.

background-color: white,

This is an incorrect declaration due to the comma, and not a complete rule.

Option D:

color: black

This is just a declaration, not a complete rule.


Reference:

W3C CSS Syntax and Basic Data Types Module Level 3

MDN Web Docs - CSS Syntax



Given the following code:



What does the #item token do?

  1. It specifies a CSS3 property.
  2. It locates an HTML5 element by its ID
  3. It defines a JavaScript function with one parameter.
  4. It creates an XML element.

Answer(s): B

Explanation:

The #item token in CSS is used to select an HTML element by its ID attribute.

CSS ID Selector:

Syntax: The ID selector is prefixed with a hash symbol (#) followed by the ID value of the HTML element.

Example: If the HTML element has an attribute id="item", it can be selected and styled in CSS as:

width: 300px;

}

Functionality:

Selects an Element: The ID selector targets the specific HTML element with the matching id attribute.

Specificity: ID selectors have high specificity, meaning they will override styles from type selectors and






Post your Comments and Discuss WGU Web-Development-Applications exam dumps with other Community members:

Join the Web-Development-Applications Discussion