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

Updated On: 28-Feb-2026

Given the following HTML code:



And given the following CSS selector:



Which elements will the CSS be applied to?

  1. Any anchors (a. element) preceded by unordered lists (ul element)
  2. All anchors (a. dement) and elements inside unordered lists ful element)
  3. Any anchors (a element) followed by unordered lists (1:1 element)
  4. All anchors (a element) and elements preceded by an unordered list (ul element)

Answer(s): B

Explanation:

Given the CSS selector a, ul, it targets all anchor (<a>) elements and all unordered list (<ul>) elements independently. This means the CSS rule will be applied to each <a> and <ul> element in the HTML document.

CSS Selector Analysis:

a: This part of the selector targets all <a> elements in the document.

,: The comma is a selector separator, meaning that each part of the selector list is applied independently.

ul: This part of the selector targets all <ul> elements in the document.

Example:

Given HTML:

<p>

<a href="http://example.com/link0">Link 0</a>

<a href="http://example.com/link1">Link 1</a>

</p>

<ul>

<li>Hello</li>

</ul>

<p>

<a href="http://example.com/link2">Link 2</a>

<a href="https://example.com/link3">Link 3</a>

</p>

<b>Sample</b>

Given CSS:

a, ul {

color: red;

}

Affected Elements: All <a> and <ul> elements will have the color set to red.


Reference:

MDN Web Docs - Comma combinator

W3C CSS Selectors Level 3



What should a developer increase to create space between a border and content?

  1. Margin
  2. Width
  3. Height
  4. Padding

Answer(s): D

Explanation:

Padding is the CSS property used to create space between the content of an element and its border.
It is an internal spacing within the element.

CSS Box Model:

Content: The innermost part, where text and images appear.

Padding: The space between the content and the border.

Border: The edge of the element.

Margin: The space outside the border, creating space between different elements.

Usage:

Padding:

div {

padding: 20px;

}

This code adds 20 pixels of padding on all sides of the content within the div element.


Reference:

MDN Web Docs - Padding

W3C CSS Box Model



Given the following markup:



Where does the image align in relation to the text?

  1. The top of The image aligns to the top of Hello World
  2. The lop of the image aligns the bottom of Hello world.
  3. The bottom of the Image aligns to the bottom of Hello World
  4. The bottom of the image aligns to the top of Held world.

Answer(s): C

Explanation:

The CSS property vertical-align: baseline aligns the baseline of the element with the baseline of its parent. For inline elements like images, the baseline alignment means that the bottom of the image aligns with the bottom of the text.

CSS vertical-align Property:

Baseline Alignment: Aligns the baseline of the element with the baseline of its parent.

Example:

<p>Hello World<img src="sample.jpg" style="vertical-align:baseline"></p>

Analysis:

The <img> element with vertical-align: baseline will align its bottom with the bottom of the surrounding text "Hello World".


Reference:

MDN Web Docs - vertical-align

W3C CSS Inline Layout Module Level 3



Which layout method causes images to render to small or too large in browser windows of different sizes?

  1. Fluid
  2. Fixed width
  3. Liquid
  4. Relative width

Answer(s): B

Explanation:

A fixed-width layout method specifies exact pixel values for widths. This approach does not adapt to different screen sizes, leading to images rendering too small or too large on various devices.

Fixed Width Layout:

Definition: Uses specific pixel values for the width of elements.

Example:

.container {

width: 800px;

}

Issues:

Lack of Flexibility: Does not scale with the size of the viewport, causing images and other elements to appear incorrectly sized on different screen sizes.

Comparison:

Fluid/Liquid: Adapts to the screen size using percentages or other relative units.

Relative Width: Also adapts using units like em or %.


Reference:

MDN Web Docs - Fixed vs. Fluid Layout

W3C CSS Flexible Box Layout Module Level 1

Using fixed-width layouts can result in poor user experience across different devices, highlighting the importance of responsive design principles.

Top of Form

Bottom of Form



Which CSS transformation method should a developer use to reposition an element horizontally on the 2-D plane?

  1. Skewx (angle)
  2. Scale (x,y)
  3. Translatex(n)
  4. Scalex(n)

Answer(s): C

Explanation:

The translateX(n) method in CSS is used to move an element horizontally on the 2-D plane by a specified distance. This transformation repositions the element along the X-axis.

translateX(n) Method: The translateX(n) function moves an element horizontally by n units. Positive values move the element to the right, while negative values move it to the left.

Usage Example:

.element {

transform: translateX(100px);

}

In this example, the element is moved 100 pixels to the right.

Properties:

n: This represents the distance to move the element. It can be specified in various units such as pixels (px), percentages (%), ems (em), etc.


Reference:

MDN Web Docs on transform

W3C CSS Transforms Module Level 1



Viewing page 14 of 29
Viewing questions 66 - 70 out of 136 questions



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

Web-Development-Applications Exam Discussions & Posts

AI Tutor