Docsity

WGU C777 Web Development Applications Practice Exam | HTML, CSS, JavaScript, Forms & Respo, Exams of Web Application Development

Toggle sidebar
bg1
0124555067869666
4 !9 "#$69606786%
&'&()&'&5*
*
+2 ,-./*
0001666662346%64
59%6786769*
:*
;:*
4:*
8:*
*
4686<4:*
*
8664$6<0666666667%6
6464759%66068006=66
66%6:*
*
+2 ,-.&*
0004 630466669=3806%
3=606867%69*
:43<6>*
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a

Partial preview of the text

Download WGU C777 Web Development Applications Practice Exam | HTML, CSS, JavaScript, Forms & Respo and more Exams Web Application Development in PDF only on Docsity!

QUESTION 1 Which HTML5 semantic element is specifically designed to contain major navigation links for a website? | 9 9 2 > QUESTION 2 Which CSS property hides an element visually while still maintaining its layout space on the web page? A. display: none; B. visibility: hidden; C. opacity: 0; D. clip: rect(0,0,0,0); QUESTION 3 What does the JavaScript typeof [] expression evaluate to? QUESTION 6 Which CSS Flexbox property aligns flex items along the cross axis when there is extra space in the container? A. justify-content B. align-items C. flex-direction D. flex-wrap Correct Answer: B. align-items Detailed Rationale: align-items controls alignment across the cross axis, while justify-content handles alignment along the main axis. QUESTION 7 Which JavaScript method is used to parse a JSON-formatted string into a native JavaScript object? A. JSON. stringify() B. JSON. parse() C. Object.parse() D. JSON.toObject() QUESTION 8 Which CSS3 relative length unit is equal to 1 percent of the viewport width? Correct Answer: B. vw Detailed Rationale: vw stands for viewport width, where 1vw equals 1 percent of the total viewport width. Correct Answer: B. document.createElement() Detailed Rationale: document.createElement generates an HTML element specified by the tag name argument before appending it to the DOM tree. QUESTION 11 Which CSS pseudo-class matches an element when the user mouse pointer hovers over it? A. :active B. :focus C. :hover D. :visited Correct Answer: C. :hover Detailed Rationale: The :hover pseudo-class applies styling rules when a pointing device hovers over an interactive element. QUESTION 12 Which jQuery method instantly hides selected elements by setting their display style to none? A. fadeOut() B. hide() C. slideUp() D. collapse() Correct Answer: B. hide() Detailed Rationale: The hide() method immediately conceals elements without animation, whereas fadeOut() and slideUp() apply gradual visual transitions. QUESTION 13 Which HTMLS input type validates that the entered text string conforms to standard URL web address syntax? A. email B. text C. url D. link Correct Answer: C. url D. arrow greet() { "Hello"; } Correct Answer: A. const greet = () => "Hello"; Detailed Rationale: Arrow functions use empty parentheses for zero parameters followed by the fat arrow and an implicit return expression. QUESTION 16 Which Geolocation API method retrieves the device current geographic coordinates? A. getLocation() B. getCurrentPosition() C. fetchCoordinates() D. getPosition() Correct Answer: B. getCurrentPosition() Detailed Rationale: navigator.geolocation.getCurrentPosition requests one-time latitude and longitude coordinates from the browser. QUESTION 17 Which CSS Grid property defines the track sizing and number of columns in a grid container? A. grid-template-columns B. grid-columns-layout C. grid-column-size D. grid-template-tracks Correct Answer: A. grid-template-columns Detailed Rationale: grid-template-columns defines column tracks and widths within CSS grid containers. QUESTION 18 What does the JavaScript array push() method return? A. The newly added item B. The new length of the array C. The entire modified array D. A boolean success status Correct Answer: B. The new length of the array Correct Answer: C. ID selector Detailed Rationale: ID selectors carry higher specificity ranking than class selectors, pseudo-classes, and element type selectors. QUESTION 21 What is the primary difference in lifespan between localStorage and sessionStorage? A. localStorage expires after 24 hours, while sessionStorage lasts indefinitely. B. localStorage persists data across browser sessions until explicitly deleted, whereas sessionStorage clears data when the tab or window closes. C. sessionStorage is encrypted, while localStorage is plaintext. D. There is no difference in lifespan. Correct Answer: B. localStorage persists data across browser sessions until explicitly deleted, whereas sessionStorage clears data when the tab or window closes. Detailed Rationale: Persistence duration defines the main difference: localStorage survives browser restarts, while sessionStorage is tied to the active browser tab session. QUESTION 22 How does JavaScript event bubbling propagate events through the DOM tree? A. From the document root down to the target child element. B. From the innermost target child element upward through parent ancestor elements to the root. C. Horizontally across sibling elements only. D. Asynchronously without a defined path. Correct Answer: B. From the innermost target child element upward through parent ancestor elements to the root. Detailed Rationale: Event bubbling is the default behavior where events trigger first on the target element and then bubble up through parent ancestors. QUESTION 23 Which jQuery AJAX shorthand method sends an HTTP GET request to a server? QUESTION 25 Which CSS3 property specifies how long a transition animation takes to complete? A. transition-speed B. transition-duration C. transition-time D. transition-delay Correct Answer: B. transition-duration Detailed Rationale: transition-duration sets the length of time a transition effect takes to execute. QUESTION 26 What is the effect of including use strict at the top of a JavaScript file? A. It compresses code size for faster downloads. B. It enables strict parsing and error handling, throwing errors for bad practices like undeclared global variables. C. It compiles script code into WebAssembly. D. It encrypts script execution in the browser. Correct Answer: B. It enables strict parsing and error handling, throwing errors for bad practices like undeclared global variables. Detailed Rationale: Strict mode enforces cleaner coding standards and prevents silent JavaScript errors by throwing exceptions for insecure syntax. QUESTION 27 Which HTMLS form attribute bypasses native browser input validation upon form submission? A. skip-validation B. novalidate C. bypass D. unvalidated Correct Answer: B. novalidate Detailed Rationale: Adding novalidate to a form element instructs the browser to skip form validation checks when submitted. QUESTION 28 Which CSS combinator selects only immediate child elements? Detailed Rationale: map() transforms each array item via a callback and returns a new array of matching length without mutating the original array. QUESTION 30 What is the main functional difference between jQuery attr() and prop() methods? A. attr() retrieves HTML attribute values as written in markup, while prop() retrieves dynamic DOM element property states. B. attr() is asynchronous while prop() is synchronous. C. prop() only works on custom user attributes. D. There is no operational difference. Correct Answer: A. attr() retrieves HTML attribute values as written in markup, while prop() retrieves dynamic DOM element property states. Detailed Rationale: prop() is recommended for checking dynamic boolean properties, whereas attr() retrieves static markup attribute definitions. QUESTION 31 What attribute does an HTMLS video element use to display a preview thumbnail image before playback begins? A. preview B. thumbnail C. poster D. cover Correct Answer: C. poster Detailed Rationale: The poster attribute specifies an image file URL displayed while the video downloads or until playback starts. QUESTION 32 What effect does box-sizing: border-box; have on an element dimensions? A. It adds padding and borders outside the specified width and height. B. It includes padding and borders within the specified width and height dimensions. C. It forces the element to stretch across the full browser viewport. D. It removes padding and borders entirely. Correct Answer: B. It includes padding and borders within the specified width and height dimensions.