Exam Information
Free practice questions with explanations
WGU Web-Development-Applications Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 13
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Validation, Testing, and Form Development
A web developer is building a shipping address form for a small online store. The form has a postal code field that must accept only five digits, a phone field, and a submit button. The team wants shoppers to see an error next to the postal code field as soon as they leave it with an invalid value, without waiting for submission and without writing a custom validation script. The form must also remain usable in browsers that do not run the team's JavaScript. Which implementation BEST meets these requirements?
Correct Answer: CExplanationThe pattern attribute combined with required uses the browser's built-in constraint validation API, which displays inline error messages on the field when the user moves away from it in current major browsers, and works without any scripting. The blur listener requires custom JavaScript and fails the no-script requirement. A select listing every postal code is impractical and does not validate free-form entry. A number type with min and max does not enforce exactly five digits, since leading zeros and length are not controlled, and it only reports errors on submission.
-
2 Question 2 Single choice Creating Adaptive Web Documents and Pages
A city transit authority publishes a service alerts page using a CSS grid layout with three named areas: header, sidebar, and main. A content editor reports that on tablets in portrait orientation the sidebar, which contains a dense list of route numbers, is pushed below the main content and the page becomes very long. The authority requires that the sidebar remain visible beside the main content on wide screens, that the layout stay within a single column on phones, and that the team avoid JavaScript-based layout changes to keep the page maintainable. Which change BEST resolves the tablet problem while meeting these requirements?
Correct Answer: CExplanationUsing a mobile-first approach, the base styles define a single column suitable for phones, and a min-width media query at 600px introduces the two-column grid, so tablets in portrait at widths above that threshold keep the sidebar beside the main content. Simply forcing a single column at 768px would move the sidebar further down on tablets, the opposite of the goal. A fixed pixel sidebar width defeats the phone requirement and causes overflow on small screens. Absolute positioning driven by a resize script violates the no-JavaScript-layout constraint and is fragile to maintain.
-
3 Question 3 Multiple choice HTML5, CSS3, and JavaScript Foundations
A developer is maintaining a product listing page. The page loads a script that renders product cards by inserting HTML strings into a container, and the team now needs the rendering to be safe from injected markup coming from a product description field that editors can edit. The developer also wants the code to run after the document has been parsed and to keep the page's CSS maintainable. Which TWO actions together BEST meet these requirements? (Choose two.)
Correct Answer: A, CExplanationAssigning description text through textContent treats the value as plain text, so any injected tags are displayed rather than executed, which addresses the injection risk. The defer attribute on an external script runs it after parsing completes while still downloading in parallel, meeting the timing requirement. Moving the script into the head without defer would run it before the container exists, and inline styles harm maintainability. document.write is discouraged and unreliable when used after parsing and does not provide safety against injection.
-
4 Question 4 Single choice Responsive Web Design (RWD) for Browsers and Apps
A regional credit union is updating its mobile banking web app, which is also packaged as an installable web app. Members often use the app on phones with a narrow viewport, and the design team wants the navigation bar to collapse into a menu button below 480px while the full bar shows on larger screens. The app must not rely on a fixed header height that would hide content behind the bar when the on-screen keyboard opens during a login form. Which approach BEST satisfies these requirements?
Correct Answer: AExplanationA max-width media query at 480px swaps the full navigation for a menu button on narrow screens, and leaving the header in normal flow with content-driven height avoids covering page content when the on-screen keyboard reduces the visual viewport. A fixed pixel header height combined with fixed positioning can hide form fields behind the bar on phones. Hiding navigation at all widths removes access on desktop. A fixed 480px navigation width would overflow or fail to adapt on most phones.
-
5 Question 5 Single choice Creating Adaptive Web Documents and Pages
A regional library publishes a events calendar page that is built as a fixed-width 960px table. Patrons on phones must scroll horizontally to read event times, and the site team has been asked to fix this without maintaining a separate mobile website. The page must keep one HTML document, use the existing content, and avoid any JavaScript-based device detection because the library's content management system strips inline scripts. Which change BEST meets these requirements?
Correct Answer: AExplanationWithout a viewport meta tag, mobile browsers render the page at a desktop-width virtual viewport and scale it down, which causes the sideways scrolling described. Adding the viewport tag and letting the layout flex with max-width lets one document reflow on any screen while respecting the no-scripts constraint. The mobile subdomain approach creates a second site the team cannot maintain, the overflow wrapper hides the problem rather than adapting it, and JavaScript swapping is ruled out because scripts are stripped.
-
6 Question 6 Single choice HTML5, CSS3, and JavaScript Foundations
A developer is building a product configurator. A block of CSS for the product card sets a fixed height of 200px and a border, but a later stylesheet linked in the page head also targets the same card with a border of 0 and a height of auto. The developer wants the card to keep its border and height of 200px for the desktop component, and the team has rules that forbid using the !important flag or inline style attributes because they hinder maintenance. The card's class must remain the same across the site. Which approach BEST resolves the conflict within these rules?
Correct Answer: DExplanationThe cascade ranks declarations first by origin, then by specificity, and only then by source order. A nested selector like .configurator .product-card has higher specificity than the single-class shared rule, so it wins regardless of where the stylesheet is linked, and it avoids !important and inline styles. Reordering links is unreliable because specificity outranks order, making the stated claim wrong. Giving the rule a second class with equal specificity depends on load order that is fragile across pages, and an inline style attribute is explicitly forbidden.
-
7 Question 7 Single choice Responsive Web Design (RWD) for Browsers and Apps
A logistics company is redesigning its driver dashboard, which must display a route table with seven columns. Dispatchers use tablets in landscape orientation at 1024px wide, and drivers use phones at 375px wide. The product owner insists that no column may be hidden on any device because drivers need the delivery window and the signature status. The company also has a strict requirement that the layout must not rely on a fixed pixel breakpoint tied to one device model. Which strategy BEST meets these requirements?
Correct Answer: DExplanationA flexible grid or stacked layout that reflows according to the container's available width keeps every column's data accessible on both 375px phones and 1024px tablets, and it avoids tying the design to a particular device model. Hiding columns violates the product owner's requirement. A fixed 1024px table forces horizontal scrolling or excessive zooming and remains unreadable. A webview with a fixed-size layout inherits the same fixed-width problem and adds maintenance cost without solving the reflow issue.
-
8 Question 8 Single choice Validation, Testing, and Form Development
A web team is building a registration form for a community college. The form includes an email field, a password field that must be at least 12 characters, and a date-of-birth field. Users report that errors appear only after they press Submit, and that the page reloads and loses their typed input. The team must provide inline error feedback as each field loses focus, keep the form working for users who have scripting disabled, and avoid storing additional personal data. Which implementation BEST meets these requirements?
Correct Answer: CExplanationNative constraint attributes provide validation that works even when scripting is disabled, and a blur listener adds the inline per-field feedback the team requires without storing personal data. Removing client-side validation contradicts the inline requirement and still reloads the page. A pattern attribute on the password alone does not cover the email or date fields, and disabling submit on keypress blocks users. Saving every keystroke to localStorage stores personal data the team was told to avoid and does not give inline feedback.
-
9 Question 9 Single choice Creating Adaptive Web Documents and Pages
A nonprofit's donation page uses a three-column layout built with floats. On tablets in portrait orientation the page shows a large empty area on the right and the footer overlaps the donation form. The web designer must change the layout so that the page adapts smoothly between widths from 320px to 1400px, keeps the same semantic HTML, and does not introduce any fixed heights that would clip text when users increase the default browser font size for accessibility. Which change BEST fulfils these requirements?
Correct Answer: CExplanationCSS grid with minmax and auto-fit creates columns that expand and collapse with the viewport without needing fixed heights, so text can grow with user font settings and the footer is placed in normal flow below the content. Fixed 600px heights clip enlarged text and break the accessibility requirement. An absolutely positioned footer with a fixed offset overlaps content at other widths. Changing div to span does not alter the layout system and would damage the semantic structure.
-
10 Question 10 Single choice HTML5, CSS3, and JavaScript Foundations
A developer is writing a JavaScript function that fetches a list of course records from an API and renders them into a page. During testing, the page occasionally shows stale results because a slow earlier request finishes after a newer one and overwrites the display. The application must keep using plain browser JavaScript with no build step and no third-party libraries, and it must not cancel requests that the server has already processed. Which technique BEST prevents the stale rendering?
Correct Answer: CExplanationAbortController is a built-in browser API that lets the script abort an in-flight fetch when a newer request begins, so only the latest response is rendered, and the resulting AbortError can be caught and ignored. The timeout approach is a guess that fails whenever network timing varies. Synchronous XMLHttpRequest blocks the main thread and is deprecated for this use, and a service worker does not reorder responses to a page's rendering sequence.
-
11 Question 11 Single choice Responsive Web Design (RWD) for Browsers and Apps
An e-commerce team is preparing an installable progressive web app version of its storefront. The product images are large and the team wants phones on slow mobile networks to download appropriately sized files. Designers have supplied each image at 400, 800, and 1600 pixels wide. The team must keep image markup accessible to screen readers, must not use JavaScript to select image sources, and must let the browser pick the best candidate based on the device's display width and pixel density. Which markup BEST meets these requirements?
Correct Answer: CExplanationThe srcset attribute with width descriptors, paired with sizes, lets the browser choose the most suitable file using viewport and density information without any script, and the alt attribute keeps the image accessible. A single large file defeats the bandwidth goal even if CSS shrinks it visually. Hidden duplicate images still lead to downloads in some browsers and add accessibility noise, while a background image is not exposed to screen readers as content and cannot be chosen by the browser's candidate logic.
-
12 Question 12 Multiple choice Validation, Testing, and Form Development
A web developer has built a page containing a form that sends data to a server. Before launch, the team wants to confirm that the markup is valid and that the page's form controls behave correctly with assistive technology and when the browser's built-in checks are used. Which TWO actions are the MOST appropriate to take? (Choose two.)
Correct Answer: C, EExplanationA markup validator catches structural problems such as unclosed tags, duplicate ids, and invalid attribute values that break parsing and assistive technology. Checking that each input has an associated label confirms the field is announced correctly to screen readers. Removing the form element and setting all inputs to text removes the browser's built-in validation and accessibility semantics. Removing the focus outline harms keyboard users and is an accessibility failure.
-
13 Question 13 Single choice Creating Adaptive Web Documents and Pages
A university department publishes course pages in which each course has a banner image of 2400 pixels wide. On phones, the banner pushes the course description several screens down, and the image is not needed for understanding the page. The content team wants the banner to remain on desktops and tablets but be hidden on phones without the page being redesigned, and they require that the hidden image is not downloaded by phone browsers. Which approach BEST meets these requirements?
Correct Answer: BExplanationA picture element with a source that carries a media condition lets the browser skip loading the image on phones, because only the matching source is requested, so the bandwidth requirement is met. Applying display none in CSS still downloads the file, as the first option notes. Emptying src through JavaScript is unreliable and disadvantaged by the no-redesign constraint, moving the banner to a background image changes the markup and accessibility, and the hidden attribute on all devices removes it from desktops without a clean path.
These are 13 of the 136 questions in the full Web-Development-Applications pack.
Get All 136 QuestionsGet all 136 questions & answers
Full access options for WGU Web-Development-Applications
Self-study
PDF Version
- 136 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 136 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 136 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the Web-Development-Applications Exam (WGU Web Development Applications (KVO1)) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.