Final Study

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Alert vs prompt

Alert just shows a message, prompt requires somekind of answer

CSS3 appearance

Allows a thing to look like a window or a button

Everytime a user shops he is filling information into

An HTML form

In JavaScript, what is an expression?

An expression is a part of a statement that is evaluated as a value. It can use any combination of variables, literals, operators and other expressions. A variable is a container that holds a value, which you can then access repeatedly in your script. An operator is a symbol character used to instruct a program how to store or manipulate a value. An operand represents a piece of data that is operated upon or manipulated in some manner.

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:

Any task a user might perform on a mobile device needs to be easy and quick to perform. Mobile Web design can be tricky, so you must be creative and keep it simple. The more content you have, the more shortcuts you need to provide. Probably the most important rule for designing any Web site is: "Give the users what they want, when they want it." When you are designing Web sites for use on mobile devices, you must also consider some additional challenges: smaller screen sizes, touchscreen use, and demand for quicker action "on the go." Provide more shortcuts

What type of data can be returned by the XMLHttpRequest object?

Any type of textual data

Why are syntax errors so common when writing JavaScript code?

Because JavaScript is case sensitive

Question 48 :What is advantageous about the fact that JavaScript is not compiled to any specific hardware platform or operating system?

Because JavaScript programs are platform-independent, they do not require time-consuming compilation, which means that scripts can be developed quickly. This advantage is enhanced by the fact that most of the interface features, such as forms and other graphical user interface (GUI) elements, are handled by the browser and HTML code. JavaScript developers need not worry about creating or handling these elements of their applications.

Why is it important to limit words to clear, necessary verbiage on your Web pages, especially on the home page?

Because most users scan the pages looking for links

Calculations in a Web page form are usually performed:

Calculations in a Web page form are usually performed by a script. The HTML5 <output> element is used to provide semantic meaning to the calculation results. The for attribute is used with the <output> element to specify the IDs of the elements whose values were used in the calculation.

What is the term for a script block that transfers program execution to a subroutine, procedure or another function?

Calling statement

Question 22 :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

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?

The -webkit- prefix is used to target Chrome and Safari. The -moz- prefix is used with Firefox, -ms- is used with Internet Explorer and -o- is used with Opera.

What does the HTML5 autofocus attribute do when applied to the HTML <select> element?

The <select> element has existed for a long time, but several new HTML5 global attributes enhance it. The <select> element creates a drop-down selection list, and it uses the <option> element to identify your list options. The HTML5 global attributes that can be used with the <select> element are as follows: the HTML5 autofocus attribute, which applies focus on the drop-down selection list when the page loads; the HTML5 form attribute, which specifies the form(s) on the page in which the <select> element appears by binding the selection list to the form (using the <form> element's id attribute); and the HTML5 required attribute, which requires the user to select a value from the selection list before the form can be submitted.

What CSS3 property can be used to create rounded corners on an image or other element?

The CSS3 border-radius property is used to create rounded corners.

Which value of the CSS3 box-shadow property specifies the shadow's size, but is optional?

The CSS3 box-shadow property adds a configurable shadow to a box. This property can take several values, which can be listed in one declaration. The spread value is optional and specifies the shadow size. The v-shadow value is required and specifies the vertical shadow position, also referred as y-offset. The blur value is optional and specifies the distance of the shadow's blur. The inset value is optional and creates an inward shadow instead of an outward shadow. The color value is optional and specifies the shadow color. The h-shadow value is required and specifies the horizontal shadow position, also referred as x-offset. Basically the v shadow and y shadow are required

Question 38 :Which of the following is the best example of good coding practice?

The following code is the best example of good coding practice wherein the opening curly brace is on the same line as the element and each declaration is placed on a separate line. This spacing makes the CSS file easier to read.

When you define a named function in JavaScript, you must begin the function block with what?

The keyword function followed by the function name

Which of the following is a JavaScript event that occurs when a page opens in the browser?

The load event occurs when the page opens, or loads, in the browser. The unload event occurs when the user leaves the page to go to a new page. It is important that you do not confuse user-driven events with script-driven event handlers. The onload event handler determines the response that will occur upon the load event. The onunload event handler determines the response that will occur upon the unload event.

Which JavaScript event occurs when the mouse pointer leaves from a link, image or other visible element on the page?

The mouseout event occurs when the mouse pointer leaves from being over a link, image or other visible element on a page, and it triggers the onmouseout event handler. The mouseover event occurs when the user moves the mouse pointer over a link, image or other visible element on a page, and it triggers the onmouseover event handler. It is important not to confuse events with event handlers.

Logical

True or false the same as Boolean

ID Selector

Uses the # in CSS and applies inline to a single element

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. Like any other Web pages, you should validate and test your mobile pages. Validation ensures that your code complies with standards. Compliance helps your site perform better and more consistently over more platforms, and prepares your pages for compatibility with evolving and future technologies. Testing shows you how your pages will perform on various platforms doing various tasks. Well-tested sites are more likely to perform as intended for your users, which helps you win and keep customers.

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 at least two characters before @ sign

How can you specify transparency for an element?

With the CSS3 opacity property

The CSS3 @font-face rule requires you to specify which two properties?

font-family and src

What Geolocation API method is used to retrieve the current geographic location of the user?

getCurrentPosition. Make sure that it is position and not location.

Question 54 :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() The history.back() method of the History API sends the browser back one page in the browser history. The history.go() method sends the browser forward (positive number) or backward (negative number) the specified number of pages in the history, where the current page is history.go(0). The history.pushState() method changes the URL in the browser window by adding a URL to the history stack.

Javascript naming

letter, _ , or $ as a first character

Question 39 :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?

section p:last-of-type

Dropdown with predefined choices

datalist

jQuery code should not run until the document is finished loading. To ensure this occurs, jQuery methods are placed within:

document.ready event

The HTML5 Drag-and-Drop API allows users to drag elements to another location on a Web page or to an external application. Which attribute enables an element to be moved?

draggable="true"

You want to create a simple click-to-call link on your mobile Web page, so that users can easily make a phone call with one click. Which line of code will add this feature?

<a href="tel:18005551212"> Call Us Now </a> Don't forget the href. Tel is for calling, sms for text.

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> form was introduced long time before html5

How do you enamble auto complete in a form?

<form autocomplete="on">

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?

<input type="text" name="firstname" autofocus>

What variable data type does this snippet of code represent?

A string because of the exclamation marks

What is a user-defined function?

A user-defined function is a named set of statements that performs a task or calculates a value. Functions enable you to write code and place it into a single unit that can perform a specific task repeatedly throughout the program, as needed. A calling statement is a statement that transfers program execution to a subroutine, procedure or function. An event is an action performed on the Web page by a user that generates a response from the script. An argument is a value or expression containing data or code that is passed on to a function or procedure. A casting variable can change from one data type to another.

versionNumber = parseInt(versionNumber, 10)

Converts to int

Which of the following is a function of the HTML5 File API?

Create preview thumbnail images during image uploads

The function has what after the function name

Curly brackets {}

Question 24 :Responsive Web Design uses three main techniques to develop responsive pages. Which technique allows you to specify CSS styles based on viewport size?

Essentially, media queries allow Web designers to target styles based on device properties, such as screen width. The grid in responsive design helps you to accommodate screen sizes that will vary widely from the screen you are using for development. The grid is an invisible (to the user) set of vertical guidelines that help the developer place the page elements. Fluid images adapt to screen size and do not exceed the width of the screen by specifying a percentage for each image instead of a pixel size. Frameworks are templates or boilerplates for responsive page designs.

Question 37 :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 arrow 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?

Experience: <input type="number" name="experience" min="0" max="40" value="10"> <input type="number"> field is usually displayed as a text box with Up and Down arrow buttons. The min and max attributes are commonly added to input types to ensure that users enter acceptable values in these fields.

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. Positioning content on a Web page is one of the most important uses for CSS in your Web designs. In addition to providing the top, bottom, left and right properties, CSS provides various ways to render the position of block-level elements using the position property for an element: static, which is the normal, or default, position of the element within a page; relative, in which the element is relative to others on a page; absolute, in which the element appears to float above the document and can be positioned as needed; fixed, in which the element remains in the same position when the page is scrolled; and inherit, in which the element inherits its position from the parent element.

JavaScript is a scripting language. Scripting languages:

For most programming tasks, you need the server to interpret a script and to return the appropriate responses. JavaScript performs its functionality on the client side, which reduces processing time dramatically. JavaScript is a client-side and server-side scripting language that adds dynamic interactivity to Web pages. It is considered a scripting language because it supports scripts, which are programs that interpret and automate task execution. Scripting languages are not compiled; instead they can perform a list of tasks that would otherwise be executed one-at-a-time by a person.

Which to use for mobile apps

HTML5 API's

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?

If you include the src attribute in a <script> element, then any text you place between <script>src="script.js"> and </script> will be ignored. Therefore, if you want to embed JavaScript code in an HTML5 document to which you are also linking an external JavaScript file, then you must use separate <script> statements to call the external file and to embed a separate script in the page. She must use separate <script> elements to call the external script file and to embed a separate script.

Question 29 :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?

In addition to HTML5, you can also perform inline form field validation of user input using JavaScript. JavaScript code is more complex than HTML5, however it can offer more browser support. You can use either JavaScript or the HTML5 pattern attribute or "email" input type to check for the presence of the @ symbol and the presence of the username prior to the @ symbol. Neither JavaScript nor the HTML5 "email" input type will verify an active e-mail address.

In JavaScript, what is a value?

In programming, objects encapsulate pre-designated attributes and behavior. An object's properties describe various attributes about the object, such as height, color, font size, sentence length and so forth. Values are the specific qualities of properties. For instance, the statement color="red" assigns a value (red) to a property (color) of an object.

Which is the "property" portion of this rule?

In the example Cascading Style Sheets (CSS) rule given, the portion that reads "color" is the property. The portion inside the curly braces is called the declaration. The portion that reads "body" is called the selector, and the portion that reads "#008080" is called the value.

alert("Good morning, " + prompt("What is your name?", "") + "!");

It concatenates two methods to display a message, then request and capture user input.

What is the purpose of the CSS3 @keyframes rule?

It defines an animation and its position, and it is required.

What is the purpose of the W3C mobileOK Checker?

It validates Web site code for mobile friendliness.

JavaScript is considered to be a relatively easy language to learn because:

JavaScript does not have all of the complex rules associated with full object-oriented programming languages. JavaScript makes an excellent first programming language to learn because the basic syntax is simple, you can debug it quickly, and literally thousands of examples with comments are available for you to look up and study. Various browsers and browser versions sometimes implement JavaScript differently. JavaScript does not require time-consuming compilation, but this means that scripts can be developed quickly.

The CSS3 box-sizing property allows you to deviate from the standard box model. Values for the CSS3 box-sizing property include content-box and border-box.

JavaScript is platform-independent.

Microsoft Implementation of JavaScript

Jscript

Which type of JavaScript error is typically a syntax error?

Load-time errors (commonly called compiler or interpreter errors) are typically syntax errors. Run-time errors are typically caused by improper use of commands. Logic errors are mathematical errors, casting errors, errors in proper command usage or errors in the structure of the script. Casting errors occur when an integer is changed into a character (or vice versa) inadvertently.

Question 10 :Which of the following was introduced to CSS before CSS version 3?

Margins

Question 28 :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?

Persistent messages that show success are most helpful for users and affirm their progress toward form completion. These are messages that are always visible to the user. They do not fade away. For example, if a user completes a field, a "Complete" message or green checkmark might appear next to it. Premature error messages can frustrate users, so be sure to allow an appropriate delay before providing feedback. Success messages should be placed outside of form fields. Validating forms after submission defeats the purpose of using inline validation.

Question 49 :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?

Placeholder attribute

Which of the following form fields are round buttons in a group of mutually exclusive pre-determined choices?

Radio buttons

Pogo sticking

Requiring the user to click submit before the validation takes place

Question 50 :In CSS, what is the name for a selector, property and value all grouped together?

Rule

What is an application programming interface (API)?

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 different departments throughout the company to achieve this goal?

Style guide

Which CSS property defines how text should be handled when it extends beyond its allotted area?

Text-overflow

Shadow effect to text?

Text-shadow

onfocus / onblur

That is when an object is selected

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?

The CSS3 box-sizing property allows you to deviate from the standard box model. Values for the CSS3 box-sizing property include content-box and border-box.

The outline property draws a line around the outside of an element, beyond the border. What can you use to create space between the border and the outline of an element?

The CSS3 outline-offset property

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?

The CSS3 text-overflow property specifies whether text that overflows the containing element should be clipped or indicated with an ellipsis. The text-overflow property is used in conjunction with the overflow property.

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.

Which statement is true regarding the HTML5 <datalist> element?

The HTML5 <datalist> element provides an autocomplete feature to an associated <input> element. The datalist contains one or more <option> elements with values that are filtered and displayed as the user types in the input field. It is like a list that compiles with choices as you type it. Remember option and input.

Which HTML5 API could you use to make an AJAX image gallery easier to navigate?

The History API can be used to control the browser history. The File API provides a standard way to interact with files on the client machine using a Web browser. The Geolocation API is used to obtain geographic information about a user. The Drag-and-Drop API allows users to move items on a Web page.

The Word Wide Web is based upon which programming model?

The Web is based upon an event-driven model. For example, whenever you click an item on a Web page, an event occurs. You are in control: You can choose to click or not click, move the mouse or not move the mouse, or change the URL at will. Because of the unpredictability of a user's actions, programming modules (called methods or functions) can be created that are independent of each other.

Which CSS3 animation property requires you to change the default value, otherwise no animation will occur?

The animation-duration property specifies how long the animation will take to complete one cycle. The default is 0 seconds. If no other value is specified, then no animation occurs. Values can be specified in either seconds (s) or milliseconds (ms).

Which of the following will correctly call a JavaScript function without error?

The code myFunction("a") will call a JavaScript function without error. The code var myFunction(1,2) and initiate myFunction(3) are incorrect because var and initiate are not keywords used to call JavaScript functions. The code myFunction(;) is not syntactically correct. Var is just defining a variable

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?

The code necessary in the alert to display the value of the myFloatingPoint variable in the resulting alert box is myFloatingPoint. Often, when you report on a variable (for example, when using an alert box), it does not matter whether you cast the variable because the casting occurs automatically. Therefore, you do not need to convert the value to a string in this example.

Which JavaScript event handler is triggered when a user clicks her mouse button outside of a particular field after typing input there?

The onblur event handler is triggered when input focus is removed from a form element (e.g., when a user clicks the mouse button outside of a particular field). The onfocus event handler is triggered when a user gives input or focus to a form element. The onclick event handler is triggered when the user clicks on a link or form element. The onmouseout event handler is triggered when the mouse pointer leaves from a link, image or other visible element on a page.

Which JavaScript object can trigger the onerror event handler?

The onerror event handler is triggered when there is an error loading an image object or a window object. (Think of the image with a little rectangle when the image don't load. )

</script> Blue and green or whatever.

The result of this script when run in the browser is two alert boxes, the first displaying the message Green and the second displaying the message Blue. By declaring the variable within function f with var v1, the variable was re-declared as local. Without the var, the original variable v1 would have been overwritten and the code would have produced two alert boxes both displaying the word Green

What is another common name for the technique of requesting and reusing data using the JavaScript XMLHttpRequest object with HTML pages and CSS?

The technique of requesting and reusing data using the JavaScript XMLHttpRequest object with HTML pages and CSS is often called AJAX (Asynchronous JavaScript and XML).

Why would you use the for attribute with the HTML5 <output> element?

To specify the IDs of the elements whose values were used in the calculation

Poster attribute

You select an image to be displayed for a video until the user clicks on play

Which JavaScript method should you use if you want to specify a message string to appear on your Web page as it loads?

You use the document.write() method to write the specified message string in the page. The document.write() method allows you to create text that is dynamically written to the window as the script is executed. For example, the code document.write("Welcome to my Web site!"); will display the message in parentheses directly to the Web page as it loads. It types as it loads

var greeting = myFunction(good morning, good evening);

Yyou must surround string with quotes

Question 3 :An object-oriented program is:

a collection of individual objects that perform different functions.

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"); Just a comma ,

break-word

breaks word to the next line without a hyphen

Html5 number

that is a dropdown list

Html5 range

that is a slider joe

on mouseout/ onmouseover

that is hovering the mouse over something


Set pelajaran terkait

Incentives, Entreprenuership, and Types of Businesses

View Set

Personality Psychology Chapter 3

View Set

World Geography Introduction Midterm exam

View Set

Final Exam Your Money and credit Uark

View Set

Chapter 1: Introduction to Operations Management

View Set

Linux | Chapter 5 Review Questions/Answers

View Set