Web Development Applications 2

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

HTML5: Enables you to add a label to an input element in a form

<label>

What is a purpose of CSS?

Applies multiple style sheets to a web page

What is the purpose of the <output> element?

Display a value calculated from data entered by the user

What is an advantage of using JavaScript over other programming languages in web development?

Easier to isolate and update errors

What is a disadvantage of using group selectors?

Elements that do not fit the style need to be overridden.

Which browser API requests a user's permission to open a file directly without uploading it?

File system access

Which two values are valid for content positioning? Choose 2 answers. -Top -Clear -Float -Sticky

Float, Sticky

Which kind of property can have the value Helvetica assigned?

Font-family

HTML5: T/F Because not all browsers support HTML5, it is recommended that you use the <button> element to create standard buttons

False

HTML5: T/F If you include both the <form> and <input> elements in your form, browsers that do not support HTML5 will default to <input> tag instructions for data submission.

False

HTML5: T/F Pogo-sticking generally occurs when inline validation

False

HTML5: T/F User input validation for HTML5 includes checks for truthful information

False

What are three important considerations when developing a mobile website? Choose three answers.

1. Interactive elements may need to be increased in size to allow for touch interactions. 2. The website should adapt to the size and orientation of the screen. 3. The total file size should be kept small so that the website does not use too much data.

HTML5 common APIs

1. Media API 2. Drag and Drop 3. Workers 4. Cookie Storage 5. Web Storage 6. SSE

Which two answers exemplify appropriate ways to reconfigure a web site's layout to be used on a mobile device? Choose two answers.

1. Minimize content columns and maximize navigation columns 2. Create dedicated web pages only for navigation

Which three techniques can be used to build a responsive website? Choose three answers.

1. Provide a separate style sheet to be applied when content is being printed 2. Use percentages when sizing elements to create a fluid design 3. Apply media queries in the CSS to change the appearance of elements based on screen size

Which three HTML techniques can be used to improve form accessibility? Choose three answers.

1. Use <fieldset> and <legend> to group related inputs 2. Use the autofocus attribute to automatically place the cursor in the first field of the form 3. Ensure every input has an associated <label>

What are three reasons why creating a mobile-friendly website may be preferred to creating a native app? Choose three answers.

1. Websites only require the user to download the content they are interested in. 2. Websites can be accessed on a wider range of devices. 3. Native apps require developers with a different skill set for each target platform.

Valid properties of <video> tag

1. height 2. width 3. autoplay 4. controls

What is the default font size for paragraph text (<p>) when a device has a viewport width of 414 pixels, given the following CCS definitions? <style> p { font-size: 16px; } @media screen and (max-width:450px) { p { font-size: 20px; } } </style>

20 pixels

What is the value of the variable a after the execution of the JS command if the variable a starts with the numeric value 5 in the following code snippet? a += 7 % 3;

6

Which structure tag should a developer use for independent, self-contained content? <aside> <main> <section> <article>

<article>

HTML5: Creates clickable button

<button type="button">

HTML5: Creates clickable button that changes all user input and settings in form back to original values

<button type="reset">

HTML5: Creates clickable button that passes all user input in form to a server for processing

<button type="submit">

HTML5: Specifies a list of pre-defined choices for an <input> element.

<datalist>

HTML5: Groups elements so that related fields are placed together in a form. Places a box around related fields.

<fieldset>

Which code must be present on a web page for a website to make use of the AppCache API?

<html manifest="my-website.appcache">

Which three inputs make use of a valid HTML5 form input type? Choose three answers.

<input type="email"> <input type="date"> <input type="search">

HTML5: Adds security to a form through asymmetric encryption by creating a key-pair generator field in the form

<keygen>

HTML5: Adds a caption for a group of items created by the <fieldset> element

<legend>

Which term is used to describe a compatibility concern about the effectiveness of your website in different browsers and versions?

Cross-browser

What is the role of the reserved word function in a JS statement?

Defines the beginning of a block of commands

Which three types of information are provided by a successful Geolocation request? Choose three answers.

Longitude Latitude Altitude

Which property is used to create space between the border and the content of a box?

Padding

What is the purpose of a <datalist> element?

Provide suggestions to the user for a form input field.

What is the main purpose of a scripting language in web pages, according to the W3C?

Provides processing power

What is the purpose of a style guide?

Provides standards for a developer to create a consistent design across media.

Why is universal markup important for WWW usage?

It helps to ensure cross-browser and device compatibility and accessibility.

Which statement describes the role of a function in JavaScript code?

It packs up commands to perform a task on the page.

Which two JavaScript characteristics have the most effect on a developer's workflow? (Choose two answers.)

JavaScript is an event-driven language. JavaScript requires rigor in specification.

Which feature is available for browsers that do not support the HTML5 <audio> element?

Text can be added to the <audio> element so that users can be notified if their browser does not support it.

What is an event handler?

a JavaScript function

Which two code examples are valid DOM window methods? (Choose two answers.)

alert('Hello World!') confirm('Hello World!')

HTML5: Applies focus on the element when the page loads

autofocus

HTML5: Allows the user to choose a date with the month and year without a time zone

month

HTML5: Specifies a name for the element that can be used to reference it

name

HTML5: Allows the user to enter rational integers or float values

number

Which two options are valid JavaScript events? (Choose two answers.)

onclick onmouseout

HTML5: Specifies a short description to provide the user with a hint about the expected input in the field

placeholder

HTML5: Allows the user to enter numbers using a slider control

range

Which text represents the event handlers in this code snippet? <button id="magicButton" type="button" onclick="makeItRed()" onmouseover="makeItYellow()" onmouseout="makeItGreen()">The Magic Button</button>

makeItRed(), makeItYellow(), and makeItGreen()

HTML5: Specifies the maximum number of characters that can be entered in the field by the user

maxlength

Given the following code snippet: 1. var request = new XMLHttpRequest(); 2. request.addEventListener('load', onRequestSuccess); 3. request.addEventListener('error', onRequestError); 4. 5. request.send(); Which code should be inserted on line 4 to complete the request?

request.open('GET', 'https://my-api.com/data');

HTML5 Requires the user to select or enter a value before the form can be submitted

required

HTML5: Allows the user to enter a phone number

tel

HTML5: Allows the user to choose a time without a time zone

time

Which code is used to retrieve the two dimensional drawing context of a canvas element?

var ctx = canvas.getContext('2d');

HTML5: Allows the user to choose a date with the week and year without a time zone

week

HTML5: Specifies whether text submitted in a form field is to be wrapped

wrap

Which z-index would put an element on the top of a stack of four elements with values 0, 1, 4, and 100?

z-index: 100

Which HTML tag is used to define boxes in the page formatting layout?

div

Which display value will stack elements horizontally across a screen, but does not permit the use of width and height properties?

Inline

Which type of error is parsed by the browser's built-in rules and will still render?

Syntax

Which two input values are considered valid given the following HTML code? Choose two answers. <input pattern="[A-Z\d]{6}" required>

-ABCDEF -ABC123

What are two reasons to validate a form before submitting to the server? Choose two answers.

-Reduce demand on server resources which are shared by many users. -Giving the user immediate feedback helps them resolve issues faster

Which is a pseudo-selector?

.main: hover

Which two basic CSS resources help create responsive web pages to accommodate rendering in different screen/window width sizes? Choose two answers.

1. @media 2. %

What are two reasons that using a code validator is more effective than a visual check of a web page's rendering in a browser when validating code?

1. Code validators can identify syntax or logic errors that are not readily visible. 2. Different browsers can have different renderings of a web page.

HTML5: Displays the result when a calculation is performed

<output>

Which HTML tag provides alternative sources for image display according to window/screen width?

<picture>

HTML5: Creates a drop-down selection list

<select>

HTML5: Identifies a multi-line text input control

<textarea>

What is the Document Object Model (DOM)?

A logical structure for accessing and manipulating HTML or XML documents

What is a programming API?

A set of well-defined functions which can be used to interact with a system

Which value will position an element relative to the document body if there are no positioned ancestors near it?

Absolute positions an element relative to the parent. If there are no parents, then it will default to relative to the document body.

Given the following code snippet: <li>Drag Me</li> How can the element be modified to enable dragging?

Add the attribute draggable="true"

Which property is needed to bind the @keyframes rule to an element?

Animation-name

Which two CSS properties are used to identify boxes in a web page layout?

Background-color Border-style

How do user interface properties increase accessibility?

By enabling the use of arrow and tab keys to navigate.

Which elements improve site performance because they load faster than Flash or GIFs?

CSS3 transforms

Why is the POST method safer than the GET method for transmitting data?

GET shows the values in the URL and may be stored in the browser history

Which is the correct example of the proper use of the <keygen> element in a form?

Generate encryption keys for secure communication

Which browser API is used when an online shopping site suggests a user's nearest physical store?

Geolocation

HTML5: Term used to describe the backward-compatibility of code, such as when new browsers support old features

Graceful degradation

Which three actions are made possible by the HTML5 File API?

Reading the contents of a file selected by a user Discovering metadata about a file selected by a user Limiting the types of files that can be selected for upload

Which is a consideration for developing an HTML5 form that works correctly across all browsers?

Rendering differences between browsers may impact the usability of the form.

Which part of CSS is defined by creating a block that includes a list of declarations?

Rule

Which two items are basic variable data types in JavaScript? (Choose two answers.)

String Boolean

Why is it important to use native HTML form elements when capturing data?

They demonstrate good usability and are compatible with assistive software.

HTML5: T/F Data submission attributes in the <input> element will override data submission attributes in the <form> element.

True

HTML5: T/F Including global attributes in the <form> element will apply their actions to all input controls in the form

True

HTML5: T/F The <button> element allows text and images to be placed within its tags

True

HTML5: T/F The Web development community A List Apart conducted a study that determined users who completed forms with inline validation worked faster and made fewer errors

True

HTML5: T/F Web form data submitted by a user is processed by a server-side script

True

When should the data be validated in a form?

Validate each input after the user has entered a value and moved on to the next field.

What is DOM (Document Object Model)

When a web page is loaded, the browser creates a Document Object Model of the page. The HTML DOM model is constructed as a tree of Objects:

HTML5: Disables the element

disabled

Which pair of property values can be used to change the background color of a box element to have it set in the color black?

background:#000000

Which two CSS properties are valid to format a <button> tag when creating buttons? Choose 2 answers.

class display

HTML5: Allows the user to choose a date without a time zone

date

HTML5: Allows the user to choose a date and time with a GMT time zone

datetime

HTML5: Allows the user to choose a date and time with a local time zone

datetime-local

HTML5: Specifies the IDs of elements whose values were used

for

HTML5: Specifies the form(s) on the page in which the element appears

form

Which change is necessary to make the declaration accept the function to be called without input parameters but still return a number? function sum(a, b) { return a+b }

function sum(a=0, b=0)

Which code should a web developer use to define a function in JavaScript?

function test(a, b) {...}

How can a custom entry be added to the browser's navigation history?

history.pushState({page: 1}, 'Page One', '?page=1')

Which two placement options are valid for JavaScript in a web page? (Choose two answers.)

inline internal


संबंधित स्टडी सेट्स

OB Gyn C3 Ch4 - PP: Menstrual Cycle

View Set

8.20.M - Quiz Review: Sub-Saharan Africa

View Set

Chapter 38, Caring for Clients With Cerebrovascular Disorders

View Set

Endocrine and Cell Communication

View Set

Weekly language Review - Q1:1 Monday Answers

View Set

Diabetes + Corticosteroids (AEQ) RN

View Set