HTML Fundamentals

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

In HTML5, which two objects in the Web Storage specification are used to store data on the client?

1.localStorage : stores data with no expiration date 2.sessionStorage : stores data for one session

What does the following HTML5 code fragment do? <video controls> <source src="myVacation.avi" type="video/avi"> <source src="myVacation.ogg" type="video/ogg">

</video> It prompts the user to choose which format of the myVacation video it should play, .avi or .ogg.

Which code fragment will display the Play and Pause controls in the audio interface?

<audio controls="controls">

Which HTML5 tag is used to mark text that has been added to the original document?

<ins>

Which code shows the correct way to nest tags in HTML5?

<p> This is HTML5<b><i>text formatting</i></b></p>

Which HTML5 tag is used to display text with a fixed-width font and preserves both spaces and line breaks?

<pre>

Which tag is used to create a drop-down list in HTML5?

<select>

Which HTML5 tag defines superscript text?

<sup>

Which code fragment will display an image file while the video is downloading?

<video width="740" height="416" poster="fireworks.jpg">

In HTML5, the autofocus attribute:

defines the cursor location when a form is first accessed.

Which CSS3 code segment styles the text color of EM elements to be red and semi- transparent?

em { color: #ff00007f}

You need to use JavaScript to access the "section1" element in the following code fragment: <div id='section1'> Which method should you use?

getElementById

On a Windows touch device, which gesture serves the same purpose as a right-click of the mouse?

hold

Which CSS code fragment centers an image horizontally?

img.center { display: block:margin-left: auto: margin-right: auto}

You create an instance named "location" of a geolocation object. Which code fragment will initiate periodic updates of a device's geographic location?

location.watchPosition(showLocation)

Which attribute prefills a default value for an input element in HTML5?

placeholder

Which code fragment sets up a timer that calls a function named "adjust" every second?

setInterval(adjust, 1000)

An HTML5 application can run without an Internet connection if:

the application specifies the use of an Application Cache interface.

You are creating a page by using HTML5. You add script tags to the page. You need to use JavaScript to access an element by id and add a class to the element. Which property or attribute should you use?

the className property

Match the CSS terms to the corresponding CSS code examples.

universal selector: * element type selector: p pseudo-class: a: hover attribute selector: input [type="text"] comment: /* this is for

You create an interface for a touch-enabled application. During testing you discover that some touches trigger multiple input areas. Which situation will cause this problem?

The input areas are too close together.

When you are working with the path API, what is the purpose of the clip method?

constrains the rendered output of the shape object

In the CSS, the flow-into property deposits:

Content into the flow

Web Workers define an API for:

Publishing frequently updated works for syndication.

Which JavaScript method is used to draw a circle on a canvas?

arc

Which three code fragments define an HTML input control?

1. <input type="tel"> , 2. <input type="search">, 3. <input type="url">

You create an interface for a touch-enabled application. You discover that some of the input buttons do not trigger when you tap the screen. You need to identify the cause of the problem. What are two possible causes?

1. The input areas overlap with other input areas , 2. The defined input areas are not large enough

Which three statements describe cookies?

1. They can be created, read, and erased using the document.cookie property. 2. They can be used only by pages on the domain where they were set. 3. They contain the data in the form of a name=value pair.

Which three are valid Java script variables?

1. xyz1, 2.int1, 3._int (Variable names must begin with a letter or special variable with either $ or _)

Which two semantic tags are used to define layouts in HTML5?

1.<footer> , 2.<section>

Which two HTML5 tags format text content only?

1.<strong> , 2.<em>

Which two tags are used with the HTML5 TABLE element?

1.<tfoot> , 2.<td>

Which two terms represent interfaces in the File API?

1.Blob, 2.FileList

Which two events are supported on touch devices?.

1.Click 2.Touchstart

Which two HTML properties can JavaScript access to change the text value of an HTML element?

1.Inner HTML 2.Title

Which two outcomes will this code fragment accomplish? (Each correct answer presents a complete solution. <audio src="happy.wav" controls="controls"> Hello World </audio>

1.On pre-HTML5 browsers, the happy.wav file will not play, and instead Hello World will be displayed. 2.On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be hidden.

Which two are WebSocket events?

1.Onmessage, 2.Onopen

Which three event attributes are used with the CAPTION element in HTML5?

1.Onmouseover (The cursor moved over the object), 2.Ondblclick (Invoked when the user clicked twice on the object), 3.Onkeydown (Invoked when a key was pressed over an element)

Which two CSS properties can be used to position multiple HTML elements next to one another?

1.Position 2.Float

Which three properties can be used with the TouchEvent object in the Safari touch API?

1.Scale, 2.Touches, 3.Rotation

Which three components define the URL used for localStorage data in HTML5?

1.Scheme, 2.Unique port, 3.Hostname

Which three events are valid for the HTML CANVAS element?

1.Scroll, 2.Mouseup 3.Hover

Which two code fragments represent ways to use HTML5 to save values to session storage?

1.SessionStorage.setItem('someKey'. 'someValue') , 2.Sessionstorage.somekey='someValue'

Which two functions support 2D transformations in CSS3?

1.Skew, 2.Matrix

When you are testing a touch interface, which two gestures can you simulate by using a mouse?

1.Tap, 2.Rotate

Which are two features of SVG?

1.Uses high performance raster-based graphics 2. can be modified using JavaScript

Which two code segments declare JavaScript functions?

1.var a=new Foo( , 2.Foo=function(a){

Which item specifies resources for an offline HTML5 application?

A CSS style sheet

Which layout can you create by using a single CSS3 region?

A table layout

Which element should you use to rotate an SVG square?

ANIMATETRANSFORM

What does "V" stand for in the file type SVG?

Vector

CSS property that defines which side of an element where other floating elements are not allowed

Clear

The data in a specific HTML5 local storage database can be accessed from:

Different browsers on the same device.

Which CSS3 code fragment will add a scrollbar only if the content exceeds the width or height of the object?

Div { inline: scroll }

You add a div object to a page. Which CSS3 code fragment will add a scrollbar only if the content exceeds the width of height of the object?

Div{ Inline: scroll}

Match the CSS position property values to the corresponding descriptions

Fixed: Element is positioned relative to the browser window. Absolute: Element is positioned relative to the first positioned ancestor Static: Element appears in the order in which it is placed in the document flow. Inherit: Element is positioned based on its parent element's position.

You need to use JavaScript to access the "section1" element in the following code fragment: <div id='section1'> Which method should you use?

GetElementById

Match the JavaScript objects to the corresponding characteristics or methods.

History: pushState() LocalStorage: has an indefinite lifetime Document: onload() SessionStorage: has a lifetime of the window Location: play()

Your HTML5 code includes this code segment: Which JavaScript code fragment will determine that a visitor has selected the "Chocolate" radio button?

If (document.getElementById("chocolate").checked == true)

Which term describes the canvas API?

Immediate-mode

What value does the following JavaScript code fragment store into the variable num? varnum = localStorage.length

Number of key-value pairs in local storage

Match the HTML5 input attributes to the corresponding descriptions:

Pattern: provides a way to set a regular expression that the value must match Placeholder: provides a way to set default text until focus is placed in an element required: provides a way to set form elements as mandatory. multiple: provides a way to allow more than one file email address in a single input

Which CSS position value is used to position an element relative to the browser window

Position:fixed

Which positioning scheme places an object in normal document flow

Relative

What is the default value of the CSS position property?

Static

Match the HTML5 elements to the corresponding functions:

THEAD: groups the header content in a table. TH: defines a header cell in a table. OPTGROUP: defines a group of related options in a drop-down list. FIELDSET: groups related elements in a form. COLGROUP: specifies a group of one or more columns in a table for formatting.

You are creating a page by using HTML5. You add script tags to the page. You need to use JavaScript to access an element by id and add a class to the element. Which property or attribute should you use?

The ClassName Property

An HTML5 application can be used without going through a manufacturer's approval process if:

The browser on the device supports HTML5

Match the touch events to the corresponding actions.

Touchcancel: the application detects more touches than it can process Touchstart: the user places a finger in the surface of the device Touchend: the user lifts a finger from the touch surface of the device Touchmove: the user drags a finger across the surface of the device.

You add script tags to an HTML page. You need to update the text value within a specific HTML element. You access the HTML element by id. What should you do next?

Use the firstChild property and set the new text value with the nodeValue property.

You need to retrieve a value from local storage by using the key "aardvark." Which code fragment should you use?

Var value =localStorage.getItem("aardvark")

Which CSS3 code fragment will style only the external links in an HTML document?

a[href^="http://"] { font-weight:bold}

Which JavaScript method allows you to register multiple handlers for a single touch event?

addEventListener

Match the CSS terms to the corresponding examples:

value: 1.8em class selector: .container id selector: #container property: margin-top declaration: font-family: Ariel

Your code includes the following fragment: <input type="text" name="text1" id="myText" /> You need to add code that will retrieve the contents of the INPUT element. Which JavaScript code fragment will accomplish this?

vartxtContents = document.getEIementyById('myText').value


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

Chapter 1: The Criminal Justice System

View Set

Nutrition Exam 1 (final practice)

View Set

Chapter 27: Face-Negotiation Theory

View Set

Anatomy and Physiology 2: Chapter 18: Blood

View Set

Real Estate Practice, Edition 9, Chapter 5 Quiz

View Set

Chapter 37 - Differential and Difference Equations 4 of 5

View Set

Human Growth and Development exam 1 childhood

View Set