HTML 5 PL questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What element can you use to name a fieldset?

<legend>

Which HTML special character entity name do you use to represent a copyright symbol?

&copy;

Which one of these should you use to style all levels of nested shadow trees?

/deep/

Which would create a button that empties the form for the user to begin again?

<input type="reset">

Which element is used to define bold text without added semantic importance?

<b>

All of the following are semantic HTML5 elements EXCEPT:

<div>

Which element is NOT valid to use in an HTML5 document?

<frame>

Where can you place the <template> tag on the page?

<head><body><frameset>

What element is commonly used today to encapsulate markup and styling instead of the Shadow DOM?

<iframe>

Which of the following elements is used to define multiple media resources for <video> and <audio>?

<source>

What do you pass as the first argument in querySelector/querySelectorAll?

A CSS3 selector

Why is selecting a proper name for your custom element important?

A good name avoids naming conflicts and infers the target audience

What is the Shadow DOM?

A place where DOM subtrees are encapsulated from the light DOM

What does the <meter> element define?

A scalar measurement within a known range

What is a polyfill?

A third-party library that provides the same functionality as a missing browser feature with a matching API to the native feature.

How many levels of a nested shadow roots will the /deep/ combinator style?

Any number of levels

What type of object do you need to create in order to write to a file with File System API?

Blob

What does the ::content pseudo element style?

Content in the <content> tags

Which of the following is NOT accessible from a Web Worker

DOM

Which of the following is NOT accessible from a Web Worker?

Document Object Model (DOM)

What is a distributed node?

Elements from the Light DOM that are displayed at an insertion point

How would you implement a drag source to accept dropped files from an OS?

Handled the DROPPED event and look and inspect the event argument for dataTransfer.types that equal FILES

Why is the <content> tag useful?

It creates an insertion point within your shadow DOM

When does JavaScript defined in a template run?

It is inert until the template is cloned and activated.

Data retrieved from an indexedDB object store is available as what type of data?

JavaScript object(s)

Not all browsers support the new input types. What do you have to do to ensure backwards compatibility?

Nothing, old browsers will default to a text input element.

Where are the methods querySelector/querySelectorAll available?

Off any DOM node

Media formats supported by the HTML audio and video elements without help from 3rd party components include all of the following EXCEPT:

QuickTime

What does the select attribute do on the<content> tag?

Specifies which DOM elements should be distributed within the content tag

How do you create a new instance of a canvas object?

getContext('2d')

What is the shadow host?

The DOM element that is hosting the Shadow DOM

What happens when JavaScript is placed within a <template> tag and the template is cloned?

The JavaScript is attached to window by default like all other JavaScript

What happens when you attempt to open an indexedDB database that doesn't exist?

The database is automatically created.

Events in the Shadow DOM are retargeted. What does that mean?

The event appears as though it came from the shadow host

Where can the link tag for imports be placed on the page?

The head

What rule must be followed for a custom element name?

The name must have a dash (-)

What is one advantage of using a socket versus a HTTP request?

The socket is much smaller in bytes.

What is the current development status of WebSQL

The spec is abandoned and use is not recommended

When are JavaScript and CSS defined directly within in an import file applied?

They apply immediately when the import file is parsed

How can Web Workers change what the user sees?

They can't, that is the responsibility of the code in the UI thread

What is a Web Worker?

Threading in the browser

What does it mean to extend a custom element?

To define an extension of an existing custom element in a separate file that extends functionality

A cursor is considered 'done' when the cursor count equals the iteration count.

True

Permanent storage persists in the browser until the application or user deletes the files.

True

The upgraded event fires only when the database version changes.

True

When does the strorage event fire?

When a change is made to a value in web storage in another tab.

When templates are nested, what happens when you activate the outer template?

You must manually activate the nested template

What method is used to start drawing on the canvas?

beginPath

What website is useful for determining HTML5 browser support?

caniuse.com

Which method should a web developer use to stop the geolocation watchPosition()?

clearWatch()

You can define the drag image by handeling which event

dragStart

Which method can be used to draw lines, circles, text and rectangles?

getContext("2d")

Which conditional statement helps determine whether the HTML5 geolocation API is available on the users device?

if (navigator.geolocation)

Which attribute is used to extend native HTML elements?

is

Which enctype value do you use in a file input type that allows a user to upload a file to a server via a form?

multipart/form-data

All are valid values for the "type" attribute of an <input> element EXCEPT:

name

Which method do you use to send a message to a web Worker from the UI thread?

postMessage

Which method do you use to update data in an object store?

put

Which command would you use to select a DIV with the 'data-role' attribute 'container'?

querySelector('[date-role="container"]')

What selection method would you use to create a "live" selection of elements?

querySelectorAll

Which attribute represents the state of the connection of a WebSocket?

readyState

Which callback function should a web developer use to create the smoothest animation?

requestAnimationFrame

Which is the correct attribute to use if you want to start an ordered list at the number 5?

start="5"

The getCurrentPosition() returns an object on success. All of these properties are guaranteed to be provided as part of the object EXCEPT:

timestamp


Kaugnay na mga set ng pag-aaral

Management Chapter 5 - Stress HW

View Set

MK 3010 - Chapter 12 Practice Quiz

View Set

AHP Semester Exam: Anatomical Planes, Directions and Regions

View Set

Chapter 21 - Forms of Business Organizations

View Set

Transformations of Exponential Functions

View Set