WGU C777 - Practice Test A
As a page developer, how do you use a grid in Responsive Web Design? A) Its invisible guidelines help you place page elements to accommodate various screen sizes. B) You use it as a template or boilerplate for all the components in a responsive page design. C) It keeps your images from exceeding the screen width by sizing with pixels instead of percentages. D) You use it to check the type of device used to view the page, then limit the range of the page design.
Its invisible guidelines help you place page elements to accommodate various screen sizes.
Moishe wants to develop mobile apps using the technologies contained in the "HTML5 family." Which language in the family should Moishe use to create dynamic, interactive capabilities for his apps? A) JavaScript B) HTML5 C) Cascading Style Sheets (CSS) D) Document Object Model (DOM)
JavaScript
What is advantageous about the fact that JavaScript is not compiled to any specific hardware platform or operating system? A) JavaScript code can be developed quickly. B) JavaScript code can be written once and run anywhere. C) JavaScript is event-drivern. D) JavaScript is browser-independent.
JavaScript code can be developed quickly.
Which of the following statements about JavaScript is true? A) Mobile browsers cannot use JavaScript. B) JavaScript runs the same on all browsers. C) JavaScript is a compiled language. D) JavaScript is platform-independent.
JavaScript is platform-independent.
Consider the following style rule: p { border: 1px solid #000; width: 10em; word-wrap: break-word; } A) Long words will wrap to the next line, without a hyphen. B) Long words will be hyphenated and wrapped to the next line. C) Long words will expand the width of the paragraph. D) Long words will extend past the border of the paragraph.
Long words will wrap to the next line, without a hyphen.
Which of the following was introduced to CSS before CSS version 3? A) Margins B) Transformations C) Transitions D) Animations
Margins
You are creating a mobile version of your Web site. Which technique should you use for the hyperlinks? A) Pad the clickable area around your links to make them easier to find and click with a fingertip. B) Use images instead of text for the link labels because images take up less space onscreen. C) Use text-based hyperlinks in extra-small fonts so they will take up less space onscreen. D) Include dynamic features such as text effects and animation to make your links easier to find.
Pad the clickable area around your links to make them easier to find and click with a fingertip.
Which of the following form fields are round buttons in a group of mutually exclusive pre-determined choices? A) Radio buttons B) Check boxes C) Select lists D) Submit buttons
Radio buttons
What is an application programming interface (API)? A) Standards and programming instructions that enable access to a software application B) Programming languages that use the DOM for data manipulation C) Universal commands for using markup languages developed by the W3C D) Functions that allow developers to communicate with a style sheet
Standards and programming instructions that enable access to a software application
You are the new Web site designer for your company and want to establish a set of conventions for publishing. Which of the following will help you standardize documents from diffferent departments throughout the company to achieve this goal? A) Style sheet B) Style guide C) W3C markup validator D) Cascading style sheet
Style guide
Aeden is a developer for a company that manufactures various products and has divisions throughout the world. He is tasked with creating a Web page that will allow team members in training to drag pictures of company products to the correct company division that creates each product. What HTML5 API can Aeden use to provide this functionality? A) The Drag-and-Drop API B) The File API C) The Geolocation API D) The AppCache API
The Drag-and-Drop API
Which HTML5 API could you use to make an AJAX image gallery easier to navigate? A) The History API B) The File API C) The Geolocation API D) The Drag-and-Drop API
The History API
Tyler wants to enhance his Web application by allowing users to continue working when they are not connected to the Internet. Which HTML5 API will enable him to do this? A) The Offline AppCache API B) The Geolocation API C) The Drag-and-Drop API D) The File API
The Offline AppCache API
Consider the following code: script var v1 = "Blue"; function f() { var v1 = "Green"; alert (v1); } f(); alert(v1); /script What is the expected result when this script is run in the browser? A) Two alert boxes, the first displaying Green and the second displaying Blue B) Two alert boxes, both displaying the message Green C) Two alert boxes, the first displaying Blue and the second displaying Green D) Two alert boxes, both displaying the message Blue
Two alert boxes, the first displaying Green and the second displaying Blue
Your Web team is finishing up development of its new mobile Web site. Your supervisor assigns one group to validation and another to testing. Which statement accurately describes either of these processes? A) Validation prepares your pages for compatibility with evolving and future technologies. B) Testing helps your site run more consistently over more platforms. C) Testing ensures that yoru code complies with standards. D) Validation shows you how your pages will perform on various platforms doing various tasks.
Validation prepares your pages for compatibility with evolving and future technologies.
You want to use JavaScript to perform inline validation on user input into your Web form's E-Mail Address field. Which of the following checks can it perform? A) Verify that at least two characters appear after the last dot B) Verify that the e-mail address is active C) Create a hyperlink for the entered e-mail address D) Add the e-mail address to your Contact list
Verify that at least two characters appear after the last dot
An object-oriented program is: A) a collection of individual objects that perform different functions. B) a collection of methods that trigger a specific function. C) a collection of events that trigger a specific function. D) a sequence of statements that define the user agents in which the program will function.
a collection of individual objects that perform different functions.
jQuery code should not run until the document is finished loading. To ensure this occurs, jQuery methods are placed within: A) a document.ready event. B) an external HTML file. C) a div element D) a content delivery network.
a document.ready event.
Consider the following code: p style="text-align: center; margin-right: 12px;" / This code is an example of: A) an inline CSS style attribute. B) a linked external style sheet attribute. C) an internal style sheet attribute. D) an embedded style sheet attribute.
an inline CSS style attribute.
Consider the following JavaScript expression: "3" + "3" = "33" This code snippet is an example of: A) concatenation performed on strings. B) mathematical precedence perfromed on numbers. C) mathematical precedence perfromed on strings. D) concatenation performed on numbers.
concatenation performed on strings.
The CSS3 box-sizing property forces elements to fit an area in a certain way, such as allowing the border and padding to fit within the defined width of an element instead of expanding it. Which of the following values are used with this property? A) content-box and border-box B) padding-box and margin-box C) border-box and padding-box D) margin-box and content-box
content-box and border-box
Which of the following is the best example of good coding practice? A) h1 { font-family: arial, sans-serif; color: #FFFFFF; font-size: 36px; } B) h1 {font-family: arial, sans-serif;color: #FFFFFF;font-size: 36px;} C) h1 { font-family: arial, sans-serif;color: #FFFFFF;font-size: 36px; } D)h1{ font-family: arial, sans-serif; color: #FFFFFF; font-size: 36px;}
h1 { font-family: arial, sans-serif; color: #FFFFFF; font-size: 36px; }
The CSS3 matrix3d transform method defines a 3D transformation using a 4x4 matrix. How many values are required for this method? A) 16 values B) 4 values C) 8 values D) 2 values
16 values
What is a user-defined function? A) A named set of statements that performs a task or calculates a value B) A statement that transfers program execution to a subroutine, procedure or another function C) An action performed on the Web page by a user and that generates a response from the script D) An object containing values that can change from one data type to another
A named set of statements that performs a task or calculates a value
In JavaScript, what is an expression? A) A part of a statement that is evaluated as a value B) A symbol character used to instruct a program how to store or manipulate a value C) A piece of data that is operated upon or manipulated in some manner D) A container that holds a value, which you can then access repeatedly in your script
A part of a statement that is evaluated as a value
Which description defines a mobile website, in contrast to a mobile app? Each correct answer represents a complete solution. Choose two. A) A website designed for encryption on mobile device browsers B) A website designed for viewing on a mobile device C) A website that must be downloaded and installed on the device D) A web application designed for a specific mobile operating system
A website designed for viewing on a mobile device A web application designed for a specific mobile operating system
In JavaScript, what is a method? A) An action that an object can perform B) A technique to create an object C) An attribute of an object D) A user-initiated action
An action that an object can perform
Which HTML5 API allows a Web program to run locally on a client system? A) Canvas B) AppCache C) Drag-and-Drop D) Geolocation
AppCache
Why is it important to limit words to clear, necessary verbiage on your Web pages, especially on the home page? A) Because most users simply scan pages quickly looking for specific information or links to it B) Because navigation aids should occupy most of the space on Web pages C) Because you need to leave room for the comments you placed in the code D) Because you need to leave room for tangential information that elaborates on the main topics
Because most users simply scan pages quickly looking for specific information or links to it
What is the term for a script block that transfers program execution to a subroutine, procedure or another function? A) Calling statement B) Argument C) Parameter D) Expression
Calling statement
Bella wants to simplify Web page creation so that she need only make on simple change to affect all like elements across the site simultaneously. To accomplish this, Bella should use: A) Cascading Style Sheets (CSS). B) the Document Object Model (DOM). C) HTML5 structure tags. D) HTML5 APIs.
Cascading Style Sheets (CSS).
You are filling in a form for a job application on a company's Web site. You see a text box with Up and Down arro buttons for a field requesting your number of years of experience. The field already shows the number 10, but you can change the number in the box by clicking the Up and Down arrows. Which HTML5 code was used to create this field on the form? A) Experience: input type="number" name="experience" min="0" max="40" value="10" B) Experience: input type="text" name="experience" min=0 max=40 value=10 C) Experience: input type="number" name="experience" min=0 max=40 autofocus=10 D) Experience: input type="range" name="experience" min="0" max="40" pattern="10"
Experience: input type="number" name="experience" min="0" max="40" value="10"
If you wannt a particular block-level element to always appear at the upper-right corner of the browser window, no matter how far down a user scrolls on the page, which type of CSS positioning should you apply? A) Fixed B) Static C) Relative D) Absolute
Fixed
Ahmed is creating an intranet site for his company that may be viewed using several different browsers. What can he do to help ensure that his Web pages render appropriately, regardless of the browser used to render them? A) Follow W3C standards carefully. B) Use more than one version of a language to ensure backward-compatibility. C) Validate the markup code using a W3C-approved code validation service. D) Use HTML5 markup code exclusively.
Follow W3C standards carefully.
Which term describes any attribute that can be used by various (and in some cases, all) HTML elements? A) Global attribute B) HTML5 attribute C) The form attribute D) The required attribute
Global attribute
What can be considered an advantage of using HTML5 APIs to create mobile apps? A) HTML5 APIs use fewer resources than plug-ins do. B) HTML5 APIs can be used in mobile browsers that otherwise do not support HTML5-compliant code. C) The use of proprietary plug-ins is made easier by embedding them within HTML5 APIs. D) You need not provide alternative content or controls within HTML5 APIs.
HTML5 APIs use fewer resources than plug-ins do.
The terms "HTML family" and "Web development trifecta" are sometimes used to refer to which combination of Web technologies? A) HTML5, CSS3 and Javascript B) HTML5, XML and CSS3 C) HTML5, JavaScript and Flash D) HTML5, Flash and XML
HTML5, CSS3 and Javascript
Which statement about local variables is true? A) If you declare a local variable, you cannot access its value from any other function except the one in which it was declared. B) If you declare a local variable, you can access its value from any function or script block on that page. C) If you declare a local variable, you cannot convert its value from a string value into a number value, or vice versa. D) You must omit the var keyword if you want to create a local variable.
If you declare a local variable, you cannot access its value from any other function except the one in which it was declared.
You are developing a form for your Web site. Which guideline should you follow when developing inline validations to assist users by notifying them of their progress toward completion? A) Include persistent messsages that show success in fields. B) Allow premature error messages so the user knows instantly when a field is incorrect. C) Include success messages inside the form fields. D) Allow the form to be submitted before notifying the user of all errors at one time.
Include persistent messsages that show success in fields.
Pieter wants to make his Web pages HTML5-compliant and eliminate the need for site visitors to download plug-ins such as Apple iTunes, Apple QuickTime, Adobe Flash or Microsoft Silverlight to listen to audio. What can Pieter do to accomplish this? A) Incorporate the audio element in his Web pages B) Incorporate the video element in his Web pages C) Incorporate the canvas element in his Web pages D) Incorporate the movie element in his Web pages
Incorporate the audio element in his Web pages
Consider the following code: alert("Good morning," + prompt("What is your name?", "") + "!"); What does this snippet of code accomplish? A) It concatenates two methods to display a message, then request and capture user input. B) It displays a message to the user when a Web page loads, prompting him or her to supply a name for use in a form. C) It compares two strings of text and returns a value of true or false, depending on the name a user supplies. D) It assigns the name supplied by a user as a value to the alert variable.
It concatenates two methods to display a message, then request and capture user input.
In JavaScript, what function does the prompt method perform? A) It creates a pop-up box with a text field and requests the user to input information into the field. B) It creates a pop-up box displaying a message that the user can dismiss by clicking OK. C) It creates a pop-up box requesting that the user confirm a message by clicking OK (yes) or Cancel (no). D) It causes a message specified by the developer to be written to the Web page.
It creates a pop-up box with a text field and requests the user to input information into the field.
What is the purpose of the CSS3 @keyframes rule? A) It defines an animation and its position, and it is required. B) It specifies an animation's position on the page, and it is optional. C) It lists properties of an animation, such as its name and duration. D) It specifies when the animation will begin and how much of it will play.
It defines an animation and its position, and it is required.
Suppose your Web team has been directed to update the company Web site to HTML5. Your supervisor is looking for ways to improve the various user forms. You suggest applying a feature that will activate the first required field on each form for input when the page loads, so that users can start there immediately and without frustration if they are completing the forms in a hurry. Which code correctly implements this feature? A) input type="text" name="firstname" autofocus B) input type="text" name="firstname" autofocus="on" C) input type="text" name="firstname" autocomplete="on" D) input type="text" name="firstname" autocomplete
input type="text" name="firstname" autofocus
Which of the following will correctly call a JavaScript function without error? A) myFunction("a") B) myFunction(;) C) var myFunction(1,2) D) initiate myFunction(3)
myFunction("a")
Which JavaScript event handler is trigger when a user clicks her mouse button outside of a particular field after typing input there? A) onblur B) onclick C) onfocus D) onmouseout
onblur
You are designing a Web site that will be visited by users on mobile devices. You have a lot of content, so you need to: A) provide more shortcuts. B) shrink your images. C) use smaller fonts. D) lay out the content on more pages.
provide more shortcuts.
Jacoby wants to use CSS3 to apply a border to the bottom of the last paragraph in each section element on a Web page. Which selector should he use? A) section p:last-of-type B) section p:last-in-container C) section p[last] D) section p~last
section p:last-of-type
Which value of the CSS3 box-shadow property specifies the shadow's size, but is optional? A) spread B) inset C) v-shadow D) blur
spread
Ken is creating an online survey in which users will rate items using the numbers 1 through 5. He wants to use HTML5 to prevent arbitrary numbers from being entered, and to make it easier for mobile device users by providing a slider control What HTML5 input type should Ken use? A) type="range" B) type="number" C) type="survey" D) type="rating"
type="range"
Which statement is true regarding the HTML5 datalist element? A) The datalist element contains option elements with values that are displayed via autocomplete when the user types in the associated input element. B) The datalist element contains select elements with values that are displayed via autocomplete when the user types in the associated opton element. C) The datalist element contains option elements with values that are displayed via autocomplete when the user types in the associated label element. D) The datalist element contains select elements with values that are displayed via autocomplete when the user types in the associated input element.
The datalist element contains option elements with values that are displayed via autocomplete when the user types in the associated input element.
What tag is usually used by Web authors to place JavaScript code within an HTML document? A) The script tag B) The head tag C) The body tag D) The object tag
The script tag
Hector has created a CSS style sheet to ensure visual and formatting consistency across the HTML documents on his company's intranet. Unbeknownst to Hector, not all computers in the company have a particular font that Hector included in the style sheet. What will occur when users whose computers do not have the font try to view the intranet? A) The users' browsers will display the content to which the font is applied in a default font face. B) The users' browsers will render invisible the content to which the font is applied. C) The users' browsers will automatically download the font from the company's font repository. D) The users' browsers will not open the HTML page containing the font.
The users' browsers will display the content to which the font is applied in a default font face.
Consider the following code: var userName = "Titan"; What component of JavaScript is "Titan" in this example? A) The variable's value B) The assignment operator C) The variable's name D) The assignment expression
The variable's value
Why would you use the for attribute with the HTML5 output element? A) To specify the IDs of the elements whose values were used in the calculation B) To specify the name of the JavaScript function used to perform the calculation C) To specify the labels of the elements whose values were used in teh calculation D) To specify the ID of the form to which the output field belongs
To specify the IDs of the elements whose values were used in the calculation