ciw pre and post exam ?s (taken test three times, not all questions are here, may be repeats) (copy version)
jQuery's DOM-related methods provide a simpler way to access and manipulate HTML elements and attributes. HTML elements are selected and jQuery performs various actions on them using the following code: $(selector).action() Which portion of this code specifies and accesses jQuery?
$
Lily's supervisor asked her to add visual interest to the company Web site by tilting images at a slight angle. Lily knows this transformation will differ depending on the browser used to view it. Which vendor prefix property will allow her to apply the transformation when the page is viewed in Chrome and Safari?
-webkit-transform
What is the default value for the CSS3 transition-duration property?
0
The CSS3 matrix3d transform method defines a 3D transformation using a 4x4 matrix. How many values are required for this method?
16 values
Consider the following JavaScript expression: (((6 - 2) * 4) / (6 - 2)) * 2 What is the result of this expression?
8
HTML5 introduces many semantic elements and attributes to make code more straightforward. Which of the following is an example of an HTML5 semantic element?
<footer>
You are creating an HTML5 form. You want the form to be able to automatically suggest and complete input as the user enters the information into fields. Which code will correctly add this feature?
<form autocomplete="on">
You are creating a Web form that will use JavaScript to calculate mortgage payments. What HTML5 element should you use to display the results of the calculation?
<output>
Ren is learning how to use jQuery to create Web pages. What is jQuery?
A JavaScript library
In JavaScript, what is a property?
A descriptive characteristic of an object that the developer specifies when creating the object
In Cascading Style Sheets (CSS), what is a rule?
A format instruction that consists of a specified selector and the properties and values applied to it
What does the AppCache manifest file contain?
A list of the files needed for the Web application to work offline
In JavaScript, what is an expression?
A part of a statement that is evaluated as a value
What two keys are created by the HTML5 <keygen> element?
A private key and a public key
The DOM is a standard that enables you to manipulate HTML elements and attributes in a Web document. What do you use to work with the DOM?
A scripting language such as JavaScript
In JavaScript, what is casting?
A technique for variable control in which a variable's value is changed from one data type to another
You are developing pages for your company's Web site. You create an HTML5 search field using the following code: <input type="search" name="search"> When you test the page on various browsers, the first browser supports the new input type and displays the search field. The second browser does not support this new input type and gracefully degrades. What type of field does the second browser display?
A text box
What does the HTML5 autofocus attribute do when applied to the HTML <select> element?
Activates the drop-down selection list for input when the page loads
In JavaScript, what is a method?
An action that an object can perform
What type of data can be returned by the XMLHttpRequest object?
Any type of textual data
What is the term for a relatively small application developed exclusively for mobile devices?
App
What is the term for a value containing data or code that is passed on to a function or procedure?
Argument
You have created a Web page using the HTML5 <nav> structural element to define a navigation area. Consider the following external style sheet code: nav { float:left; width:165px; background:#d8d8d8 url(background.gif) top right; height:662px; } Where on the page will the image (background.gif) appear?
At the top right of the nav section
Nevine wants to improve her JavaScript program's efficiency and scalability by defining her own processes, or functions. Why are functions such an integral part of writing JavaScript code?
Because they perform specific tasks repeatedly throughout your program, as needed
Consider the following code: var emeraldGreen = true; What variable data type does this snippet of code represent?
Boolean
You can use CSS to align images to text. Which of the following alignment options is the default alignment?
Bottom
How can you link an HTML document to an AppCache manifest file named date.appcache?
By adding the manifest="date.appcache" attribute to the <html> tag
How can you override a particular style in an HTML element if the HTML document is linked to a style sheet?
By applying an inline CSS style attribute to the element whose style you want to override
Which version of Cascading Style Sheets uses a modularized approach that enables timelier updates to the standard?
CCS3
Which of the following statements about Cascading Style Sheets (CSS) is true?
CSS commands contain formatting instructions that determine how to display HTML elements in Web pages.
In JavaScript, what term is used to describe the technique of changing a variable's value from one data type to another?
Casting
Which of the following is a key difference between responsive site design and mobile site design?
Content on a responsive site is easier to update and maintain because the site is not separate.
You are creating a mobile version of a community discussion site for busy moms. Users post questions and other topics for discussion. Some days there are as many as 20 new discussion threads. Considering your audience, what might be the best way to lay out navigation elements on the home page?
Create a small, collapsible navigation bar at the top of the home page so users can see new topics without scrolling.
When you load a page containing your JavaScript code into a browser, how can you ensure that your functions will be available before any user event can occur that might call a function?
Define all your functions in the <head> section of your HTML page.
Hugo has created an HTML document to which he has attached an external CSS style sheet containing styles that define all HTML elements in the document. Hugo wants to apply styles to his home page only that will override the style definitions of the attached style sheet. How can he accomplish this?
Embed an internal style sheet.
Patrick is creating a form for his Web site, and he wants to have visitors provide their names. Which HTML5 code would ensure that users enter their first names prior to submitting the form?
First Name: <input type="text" name="firstname" required >
If you want 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?
Fixed
A Web designer who assigns specific pixel widths to elements using the HTML structural elements is using what page-layout method?
Fixed-width
Which technique can developers use to keep images from exceeding the screen width of users' mobile devices?
Fluid images
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?
Follow W3C standards carefully.
What should be your general goal as a Web developer?
For all users to have a quality experience at your site, regardless of the size of their display
What describes a syntax error?
Forgetting to close the curly braces that designate a block of code for execution
Which of the following examples describes a syntax error?
Forgetting to close the curly braces that designate a block of code for execution
In JavaScript, what is the term for a named set of statements that can perform a specific task repeatedly throughout a program, as needed?
Function
Occasionally, you will want to declare a variable that can be accessed by more than one function or script block in your program. You will need to declare that variable outside of any function definition, usually at the start of your script. What term is used to describe this type of variable?
Global variable
Much HTML5 code has backward compatibility built in that enables it to render acceptable substitutes on the page when older browsers cannot support the newer HTML features. Which term is used to describe this feature?
Graceful degradation
HTML comes in several versions. Which of the following includes the Transitional, Strict and Frameset "flavors"?
HTML 4.01
Which technology provides browsers with functionality that previously required users to install proprietary plug-ins?
HTML5 APIs
You want to create Web pages that can easily adapt to and serve multimedia content to smartphones, tablets, gaming devices and smart TVs, as well as to traditional desktop computers, without the use of plug-ins. Which of the following would be best suited for this purpose?
HTML5 APIs
Experts in Web technology expect that the future of Web development will rely heavily on:
HTML5 APIs.
Which of the following statements about HTML5 is true?
HTML5 does not require third-party plug-ins for video and audio content.
What three technologies used together provide Web pages that easily adapt to smartphones, tablets, gaming devices and smart TVs, as well as to traditional computers?
HTML5, Cascading Style Sheets (CSS) and JavaScript
Which of the following statements about validating markup is true? *If a code validator finds an error, the remaining code on the page may fail validation, even if the remaining code is actually valid. *The advantage of using a code validator is that it will always determine the correct cause of failed code. *The disadvantage of using a code validator is that it cannot determine to which HTML specification to validate. *A code validator will flag only non-W3C-compliant code as erroneous.
If a code validator finds an error, the remaining code on the page may fail validation, even if the remaining code is actually valid.
Which statement about global variables is true?
If you declare a global variable, you can access its value from any function or script block on that page.
Which statement about local variables is true?
If you declare a local variable, you cannot access its value from any other function except the one in which it was declared.
You want to add the same functionality to various Web sites you have created for your school district without having to add the script to each HTML page. Where should you place your JavaScript code to accomplish this in the most efficient manner?
In an external text file with the .js file name extension
When you embed JavaScript within an HTML document, in what document sections can you add the script?
In the <head> and/or the <body> sections
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?
Incorporate the <audio> element in his Web pages
You can use a CSS style sheet rule to override styles specified in a linked external style sheet. Which term is used to describe this style sheet behavior?
Inheritance
What is one advantage to using JavaScript instead of HTML5 to validate an input field that is requesting the user to input an e-mail address?
It offers more browser support.
What is the purpose of the W3C mobileOK Checker?
It validates Web site code for mobile friendliness.
As a page developer, how do you use a grid in Responsive Web Design?
Its invisible guidelines help you place page elements to accommodate various screen sizes.
You are reviewing HTML5 markup code that your co-worker created. You notice several <object> tags that reference external stand-alone, mini-applications. Which language did your co-worker most likely use to create these mini-applications?
Java
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?
JavaScript
Prior to HTML5, what did Web developers use to conduct inline validation in HTML forms?
JavaScript
Which statement most accurately describes the relationship between JavaScript and Java?
JavaScript and Java are unrelated.
CSS3 allows you to create rounded navigation menus without the use of:
JavaScript or images.
A Web designer who assigns percentage values to elements using the HTML structural elements is using what page-layout method?
Liquid
What type of JavaScript expression evaluates to true or false?
Logical
Consider the following style rule: p { border: 1px solid #000; width: 10em; word-wrap: break-word; } What effect will the word-wrap property have on text within the paragraph?
Long words will wrap to the next line, without a hyphen.
Kwan is using JavaScript extensively to add interactivity to his Web site. Contained within his script is a counter object that calculates a date based on a number input by the user. Which term describes the calculation process that Kwan's counter object performs?
Method
Which statement correctly describes an advantage that mobile Web sites have over mobile apps?
Mobile Web sites work on any device with a browser so you can create them once and run them anywhere.
While filling out a form, Oscar neglected to enter a value in the "Middle Initial" field, and then submitted the form. What variable data type will the "Middle Initial" field contain?
Null
What variable data type should you use if you want to specify numeric values for mathematical operations?
Number
Expressions rely upon what to produce a value?
Operators
You are creating a mobile version of your Web site. Which technique should you use for the hyperlinks?
Pad the clickable area around your links to make them easier to find and click with a fingertip.
What is the default security algorithm used with the HTML5 <keygen> element?
RSA
Which of the following form fields are round buttons in a group of mutually exclusive pre-determined choices?
Radio buttons
Which method of form input validation is sometimes referred to as "pogo-sticking" and may lead to users becoming frustrated or impatient with the form?
Requiring users to click Submit before validation occurs
Joey wants to develop a "one size fits all" Web page that will adjust to the screen size of different devices, such as traditional Web browsers, smartphones and tablets. Joey decides to use HTML5 and CSS3 to create the pages. What term describes the type of Web page creation in which Joey wants to engage?
Responsive design
What makes a scripting language, such as JavaScript, different from a full programming language, such as C, C++ and Java?
Scripting languages are generally interpreted without the explicit compilation step that full programming languages need to run.
HTML5 includes additions that are intended to help users enter information into forms when using touchscreen keyboards and small mobile device screens. Form fields should also be clearly defined so users know exactly what input is expected. These improvements should increase form completion rates. Which HTML5 additions are new or expanded fields that describe their content to developers as well as to browsers?
Semantic input types
Kate has created a complex script that she wants to attach to multiple HTML files, but she also wants to add a simple script to only certain sections of one page. What must she do to apply both scripts?
She must use separate <script> elements to call the external script file and to embed a separate script.
Natalie is using the CSS position property to position block-level elements on her Web pages. Which positioning scheme describes the normal, or default, position of an element within a page?
Static
Consider the following code: var yearBirth = "1956"; What variable data type does this snippet of code represent?
String
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 different departments throughout the company to achieve this goal?
Style guide
Which statement accurately describes a key difference between mobile site design and responsive site design?
The <datalist > element contains <option> elements with values that are displayed via autocomplete when the user types in the associated <input> element.
Which statement is true regarding the HTML5 <datalist> element?
The <datalist > element contains <option> elements with values that are displayed via autocomplete when the user types in the associated <input> element.
Roshon wants to create an HTML5-compliant page that has four sections: a section that contains the site navigation links, top and bottom sections that contain a logo and copyright information, and a section that contains the main message of the page. Which elements should Roshon use to create these sections?
The <header>, <footer>, <nav> and <main> elements
Which HTML5 element can you use to add security to a form in a Web page by generating a key pair?
The <keygen> element
As a Web designer, you want to ensure that HTML elements will not overlap or lay against one another when users render your Web pages in a browser. What can you use to help you configure the space around each HTML element?
The CSS Box Model
As a Web designer, you want to ensure that HTML elements will not overlap or lay against one another when users render your Web pages in a browser. Which of the following can you use to help you configure the space around each HTML element?
The CSS Box Model
You are creating a Web page that will display game graphics on the fly. You do not want to rely on browser plug-ins or third-party JavaScript libraries. Which of the following should you use?
The Canvas API
Which statement about the Document Object Model (DOM) is true?
The DOM provides a standard interface so you do not need to develop multiple versions of your scripts tailored for each browser.
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?
The Drag-and-Drop API
Which HTML5 API could you use to make an AJAX image gallery easier to navigate?
The History API
You have created a new Web site for your company, and you want to add a script so that a "welcome" pop-up box appears to the user as soon as he or she launches the site. Which JavaScript method should you use to display the message?
The alert() method
Which CSS3 animation property requires you to change the default value, otherwise no animation will occur?
The animation-duration property
Consider the following code: CSS file: .right { text-align: right; } HTML file: <h3 class="right">Right-aligned heading level three<h3> <p class="right">Right-aligned paragraph<p> This code shows an example of what?
The class selector
You can use CSS to align images to text. Which property should you use if you do not want floating images to appear before or after text?
The clear property
As a Web designer, you use the CSS Box Model to help configure the space around each HTML element so that the elements will not overlap or lay against one another when users render your Web pages in a browser. What constitutes the full size of an HTML element?
The content plus the padding, border and margin surrounding it
Which statement about modern Web design is true? *The design of mobile Web pages requires no differences from pages designed for desktop computers. *The design of mobile Web pages requires some differences from pages designed for desktop computers. *Web developers must specialize in designing for either desktop or mobile devices, but not both. *The basic language and procedures for creating Web pages is completely different for mobile and desktop design.
The design of mobile Web pages requires some differences from pages designed for desktop computers.
Which statement regarding external CSS style sheets is true?
The external CSS file to which you link contains only CSS style rules, no HTML.
The <label> element enables you to add a label to a form field, such as an <input> element. What attribute of the <label> element is used to bind it with the associated form field?
The for attribute
Consider the following code: CSS file: #red { color: #FF0000; } HTML file: <p id="red">This paragraph has red text <p> <p>Not affected<p> This code shows an example of what?
The id selector
CSS classes are useful for floating images to the left or right of text. Consider the following CSS class entry: img.floatspecification { float: right; margin: 5px; } Which statement describes how the text and image will appear relative to each other?
The image will appear to the right of the text.
Consider the following style rules: img { height: 150px; width: 150px; transition: height 3s, width 3s; } img:hover { height: 300px; width: 300px; } Using these styles, what will occur when a user hovers over an image on the page?
The image's height and width will gradually increase to 300 pixels over a 3-second time period.
When you define a named function in JavaScript, you must begin the function block with what?
The keyword function followed by the function name
You are creating a Web-based mapping application. What information can you obtain by using the HTML5 Geolocation API in your application?
The latitude and longitude of a user's device
Consider the following code: <input list="continents" name="continent"> <datalist id="continents"> <option value="North America"> <option value="South America"> <option value="Europe"> <option value="Asia"> <option value="Africa"> <option value="Australia"> <option value="Antarctica"> </datalist> Which two attributes' values must match each other in order to bind the <datalist> element with the <input> element?
The list attribute and the id attribute
Which HTML5 attribute can help users input valid form data in the <textarea> element by providing the user with a hint identifying the expected input in the field?
The placeholder attribute
Consider the following Cascading Style Sheets (CSS) rule: body {background-color: #008080;} Which is the "selector" portion of this rule?
The portion that reads "body"
Consider the following Cascading Style Sheets (CSS) rule: body {color: #008080;} Which is the "property" portion of this rule?
The portion that reads "color"
Selena is embedding a video in her HTML5 page. Which attribute should she use to identify the location and file name of the video?
The src attribute
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?
The users' browsers will display the content to which the font is applied in a default font face.
It is always wise to review your JavaScript code manually, but manual reviews do not always catch errors, and with long programs they can be time-consuming. To save time, you can use various debugging tools. How are these tools helpful?
They help you detect and locate errors in your code.
Regarding HTML5 forms, how are HTML5 input types displayed in various browsers?
They may display differently in various browsers.
What is the purpose of the CSS3 transition-delay property?
To define when the transition will begin
What is the purpose of the CSS3 @font-face rule?
To enable developers to specify custom fonts for Web page elements
Consider the following code: <script> var v1 = "Blue"; function f () { this.v1 = "Green"; alert (this.v1); } f(); alert (v1); </script> What is the expected result when this script is run in the browser?
Two alert boxes, both displaying the message Green
In general, what can you use the XMLHttpRequest object to do in your Web pages?
Update content on Web pages without reloading them
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?
Validation prepares your pages for compatibility with evolving and future technologies.
HTML5 includes additions that are intended to help users enter information into forms when using touchscreen keyboards and small mobile device screens. Form fields should also be clearly defined so users know exactly what input is expected. These improvements should increase form completion rates. Which of these HTML5 additions are built-in processes that can check and guide user input into form fields before form submission?
Validation tools
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?
Verify that at least two characters appear after the last dot
Your Web development team is using Responsive Web Design (RWD) techniques to develop the company's new site. You are directed to ensure that all images are fluid. How can you do this?
Verify that each image file's size is specified using percentage values instead of pixel values.
How can you specify transparency for an element?
With the CSS3 opacity property
You are using some graphics that require WebGL for important functionality on your mobile site. Which statement describes the support you can expect or provide for this?
You can provide users with a link to test for WebGL support and obtain a supporting browser.
jQuery code should not run until the document is finished loading. To ensure this occurs, jQuery methods are placed within:
a document.ready event.
The naming rules that apply to function names stipulate that a function name must begin with:
a letter, dollar sign or underscore character.
JavaScript has some basic rules for naming variables. For example, the first character of the variable name must be:
a letter, the underscore ( _ ) character or the dollar sign ( $ ).
What selector could you use to select every <a> element whose href attribute value begins with mailto:?
a[href^="mailto:" ]
Each time a user logs on to a service, shops or conducts online business, he or she is filling information into:
an HTML form.
Liza wants to add continuous animation to her Web site, but she does not want to require users to install a browser plug-in. Which CSS3 property should she use to accomplish this?
animation
Which CSS3 property is used to bind a selector to the animation defined in an @keyframes rule?
animation-name
The HTML5 APIs can be use to create:
apps for mobile devices.
Which CSS3 property defines whether or not a transformed element is visible when it is rotated to face away from the viewer?
backface-visibility
CSS3 added support for multiple background images. Which declaration uses the correct syntax for applying two background images to the same element?
background-image: url("images/logo.png"), url("images/pattern.png");
What CSS3 property can be used to create rounded corners on an image or other element?
border-radius
Calculations in a Web page form are usually performed:
by a script.
The HTML5 datetime input type allows the user to:
choose a date and time with a GMT time zone.
Consider the following JavaScript expression: "3" + "3" = "33" This code snippet is an example of:
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?
content-box and border-box
Why would you use the for attribute with the HTML5 <output> element?
controls="controls"
You are embedding a video in your HTML5 page and want to incorporate the Play, Pause, Rewind and Volume video controls. Which attribute is needed to accomplish this?
controls="controls"
Ezra wants to use an image to completely cover the background in a Web page. He wants to fill the entire background while maintaining the aspect ratio of the image. Which value should he assign to the CSS3 background-size property?
cover
You can test your mobile site pages on a client emulator to ensure:
cross-browser and device compatibility.
When you define a named function in JavaScript, you begin the function block with the keyword function followed by the function name. The rest of the statements that form the function must be enclosed in:
curly brace { } characters.
What Drag-and-Drop API method is called when a page element is dropped after being dragged?
drop()
Which of the following is a global HTML5 attribute that can be used with the <button> element to specify whether form input will be sent to the server using get or post?
formmethod
What is the basic code you would need to define a named function that returns a value?
function myFunction() { return value; }
Which DOM method is used by the <canvas> element to return a context object, which provides properties and methods that can be used to draw and manipulate images on the canvas?
getContext()
To send the browser back one page in the user's browsing history using the HTML5 History API, you should use which method?
history.back()
Which History API method changes the URL in the browser window by adding a URL to the history stack?
history.pushState()
JavaScript is a scripting language. Scripting languages:
interpret and automate a list of tasks that would otherwise be executed one-at-a-time by a person.
Which of the following is a JavaScript event that occurs when a page opens in the browser?
load
Which JavaScript event occurs when the mouse pointer leaves from a link, image or other visible element on the page?
mouseout
Consider the following code: var myFloatingPoint = 34.75; alert(/* your selection here */); Considering the alert() function requires an argument of type string, which code is necessary in the alert to display the value of the myFloatingPoint variable in the resulting alert box?
myFloatingPoint
Which of the following is an event handler for the button object?
onclick
Which CSS3 selector can you use to apply a style to the first paragraph of every container in a Web page?
p:first-of-type
JavaScript follows mathematical precedence, which means that:
parenthetical expressions take precedence over multiplication.
In your HTML5 form, you want users to enter a date in the Date field using a specific format, such as mm/dd/yyyy. Which HTML5 <input> element attribute can you use to require the specified format?
pattern
Your form has a field for users to enter an e-mail address. You use <input type="email"> to create the field. What other HTML5 attributes could you use with the "email" input type to most effectively ensure that users do not inadvertently enter an extra space, an invalid format or an irrelevant answer?
pattern, placeholder, required
Which of the following methods returns a value in the form of a text string?
prompt()
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:
provide more shortcuts.
You need to ensure that users fill in certain fields in your Web form. Which attribute can you include in a form field's <input> element that will prevent the entire form from submitting if that field is left empty?
required
To allow users to change the size of elements on a Web page, such as a <div> element, you can add which CSS3 property?
resize
Consider the following code: < script> function mySum(a, b) { ...(your selection here) } alert(mySum(2,3)); </script> Which code properly supplies the alert with the sum of the two numbers?
return a+b;
Which JavaScript object can be affected by the onchange event handler?
select
The overflow property can be used to hide text that extends beyond the boundaries of an element. Which CSS3 property can be used with the overflow property to indicate that text has been trimmed by displaying an ellipsis?
text-overflow
Which CSS3 property can you use to apply a shadow effect to text?
text-shadow
To position an element behind another element, you can assign a negative value to:
the Z-index property.
JavaScript is considered to be a relatively easy language to learn because:
the basic syntax is simple and many examples with comments are available for you to study.
Using a linked style sheet, you have modified the look and feel of an HTML page. Because of the concept of inheritance, you notice that:
the rules you applied remain in force unless explicitly overruled using other styles.