NEW
Font size
S
M
L
XL
WorksheetsuCertify UID Chapter 7 Test
Total questions: 30
Worksheet time: 15mins
Name
Class
Date
1.
HTML5 APIs consist of HTML5, CSS and JavaScript
True or False?
True or False?
a)
True
b)
False
2.
________describes the elements within a document rendered by a Web browser as objects (such as the head object, the body object, the heading objects, etc.).
a)
HTML5
b)
Document Object Model (DOM)
c)
JavaScript
d)
CSS3
3.
All browsers are NOT DOM-compliant
a)
True
b)
False
4.
________is an HTML5 API that provides a place on a Web page (a "canvas") where developers can display graphics, animation, video and games "on the fly" without the need for a plug-in.
a)
Offline Application Cache
b)
Geolocation
c)
Drag-and-Drop
d)
Canvas
5.
What are the default width and height of Canvas API?
a)
Width = 300
Height = 150
Height = 150
b)
Width = 150
Height = 300
Height = 300
c)
Width = 200
Height = 100
Height = 100
d)
Width = 30
Height = 15
Height = 15
6.
What string will call the <canvas> element's drawing context?
a)
canvas.getContext("3d")b)
canvas.getContext("2d")c)
canvas.loadContext("2d")d)
<canvas>("2d")7.
fillRect(x,y,width,height)
a)
Draws a filled rectangle
b)
Draws a rectangular outline
c)
Clears the specified area and makes it fully transparent
8.
strokeRect(x,y,width,height)
a)
Draws a filled rectangle
b)
Draws a rectangular outline
c)
Clears the specified area and makes it fully transparent
9.
clearRect(x,y,width,height)
a)
Draws a filled rectangle
b)
Draws a rectangular outline
c)
Clears the specified area and makes it fully transparent
10.
Either begins a drawing path or resets the current path
a)
beginPath()
b)
closePath()
c)
stroke()
d)
fill()
11.
Ends the current drawing path
a)
beginPath()
b)
closePath()
c)
stroke()
d)
fill()
12.
Adds a stroke (line) to the path drawn
a)
beginPath()
b)
closePath()
c)
stroke()
d)
fill()
13.
Fills the area with the color set by the fillStyle property
a)
beginPath()
b)
closePath()
c)
stroke()
d)
fill()
14.
Where in an HTML document should you place a function if you want the function to load when the browser reaches the script point in the page or when the appropriate user event occurs?
a)
The <title> section of your page
b)
The <meta> section of your page
c)
The <body> section of your page
d)
The <head> section of your page
15.
Which of the following JavaScript objects uses the onerror event handler?
a)
link
b)
button
c)
window
d)
form
16.
In JavaScript, what is an argument?
a)
A value or expression containing data or code that is passed on to a function or procedure
b)
A statement that transfers program execution to a subroutine
c)
A named block of code that can be called
d)
Any method that returns a value
17.
The Word Wide Web is based upon which programming model?
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
a)
An event-driven model
b)
An object-oriented model
c)
An object-based model
d)
A platform-independent model
18.
On your Web page, you include various links and clickable images that have the ability to trigger various functions when users click them with the mouse. What term describes user-initiated action on a Web page?
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
a)
Event
b)
Script
c)
Platform
d)
Object
19.
What does the term "user agent" mean?
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
a)
Any application, such as a Web browser or help engine, that renders HTML for display to users
b)
Any operating system, such as Windows, Linux or Apple, that supplies graphical application interfaces
c)
Any hardware platform to which scripting languages can be compiled
d)
Any application that uses a scripting language to extend its capabilities
20.
Why is it important to test your JavaScript code in as many browsers as possible?
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
Lesson: Introduction to JavaScriptObjective: JavaScript Characteristics
a)
Because JavaScript requires time-consuming compilation
b)
Because different browsers sometimes implement JavaScript differently
c)
Because the basic JavaScript syntax is very complex
d)
Because JavaScript code operates independently of user events
21.
What is the term for a standard that specifies how objects in a Web document can be referred to and manipulated through scripting languages?
Lesson: Using HTML5 APIs
Lesson: Using HTML5 APIs
a)
Document Object Model (DOM)
b)
Application Programming Interface (API)
c)
Cascading Style Sheets (CSS)
d)
Asynchronous JavaScript and XML (AJAX)
22.
All browsers are DOM-compliant, which means that:
a)
you can develop Web applications "on the fly" without the need to validate your source code.
b)
you can develop Web applications that do not rely on proprietary browser plug-ins.
c)
JavaScript is the only scripting language you can use with HTML5.
d)
you do not need to develop multiple versions of your scripts tailored for each browser.
23.
What is the term for a set of universal commands, calls and functions that allows developers to communicate with an application or operating system?
a)
Document Object Model (DOM)
b)
Application Programming Interface (API)
c)
Cascading Style Sheets (CSS)
d)
Asynchronous JavaScript and XML (AJAX)
24.
What technologies make up HTML5 APIs?
a)
HTML5, CSS and XMLHttpRequest
b)
HTML5, CSS and AJAX
c)
HTML5, CSS and JavaScript
d)
JavaScript, XMLHttpRequest and AJAX
25.
Which of the following describes the HTML5 Canvas API?
a)
It provides a directory on a computer where applications can be stored and run without access to the original application.
b)
It is used to determine a user's location.
c)
It provides an area on a Web page that has been defined as a place where dragged items can be placed.
d)
It provides a place on a Web page where developers can display graphics, animation, video and games "on the fly" without the need for a plug-in.
26.
What technology is required to draw objects on the "canvas" of the HTML5 Canvas API?
a)
JavaScript
b)
Document Object Model (DOM)
c)
AJAX
d)
CSS
27.
The HTML5 Canvas element has two attributes. Which are they?
a)
Height and width
b)
Border and margin
c)
Border and shape
d)
Background and transparency
28.
Although you can draw various shapes on the HTML5 Canvas, Canvas supports only one primitive shape. Which is it?
a)
The circle
b)
The line
c)
The rectangle
d)
The dot
29.
The <canvas> element uses a method to provide the properties and methods that can be used to draw and manipulate images on the canvas. Without this method, the canvas would be blank. What is the name of this method?
a)
The getCurrentPosition() method
b)
The getContext() method
c)
The watchPosition() method
d)
The clearWatch() method
30.
What is WebGL (Web Graphics Library)?
a)
An HTML5 API used for rendering visual images on the fly by providing scripts with a bitmap image
b)
A collection of standards and programming instructions that enable access to a software application
c)
A directory on a computer where applications can be stored and run without access to the original application
d)
A JavaScript API that enables rendering of interactive 3D and 2D graphics in an HTML canvas
Reset
