ANSWERS 2025
A JavaScript rule concerning variables states that the first character of a variable name must be:
A) a letter, the "at" symbol ( @ ) or the dollar sign ( $ ).
B) a letter, the "at" symbol ( @ ) or the ampersand ( & ).
C) a letter, the underscore character ( _ ) or the dollar sign ( $ ).
D) a letter, the ampersand ( & ) or the dollar sign ( $ ). - ANSWERS a letter, the underscore
character ( _ ) or the dollar sign ( $ ).
All browsers are DOM-compliant, which means that:
A) you can develop Web applications that do not rely on proprietary browser plug-ins.
B) you do not need to develop multiple versions of your scripts tailored for each browser.
C) you can develop Web applications "on the fly" without the need to validate your source code.
D) JavaScript is the only scripting language you can use with HTML5. - ANSWERS you do not
need to develop multiple versions of your scripts tailored for each browser.
Although you can draw various shapes on the HTML5 Canvas, Canvas supports only one
primitive shape. Which is it?
A) The dot
B) The rectangle
C) The circle
D) The line - ANSWERS The rectangle
Before CSS3, background image size was largely dependent on the size of the original image.
What CSS3 property can you use to resize a background image?
,A) The background-origin property
B) The background-clip property
C) The background-size property
D) The background-crop property - ANSWERS The background-size property
Canvas is an HTML5 API that provides a place on a Web page (a "canvas") where you can
display graphics, animation, video and games dynamically without the need for a plug-in. Which
of the following should you use to create objects on a canvas?
A) Flash
B) CanvasScript
C) Cascading Style Sheets (CSS)
D) JavaScript - ANSWERS JavaScript
Code errors can be repaired, once you are aware of them. What should you do first after you
have written your script code, and placed it in (or attached it to) an HTML file?
A) Use a third-party add-on debugging tool to locate and fix any errors in your code.
B) Test the code by running your script in multiple browsers and browser versions to see if it
works as intended.
C) Manually review each line of code in your script.
D) Use your browser's native debugging tool to locate and fix any errors in your code. -
ANSWERS Test the code by running your script in multiple browsers and browser versions to see
if it works as intended.
Code validation is the process of:
A) creating code that responds to user screen size.
B) accessing another point in a Web page or separate Web page.
C) determining how to display HTML elements in your Web page.
,D) checking your code to verify that it complies with the syntax rules for your chosen standard. -
ANSWERS checking your code to verify that it complies with the syntax rules for your chosen
standard.
Consider the following code (line numbers added for reference):
function makeBold(text) {
var boldText = text.bold()
//insert code here
}
What code statement must be inserted in Line 3 to return the text in bold to the calling
statement?
A) makeBold = boldText;
B) return true;
C) return makeBold;
D) return boldText; - ANSWERS return boldText;
Consider the following code from a CSS document:
body {background-color: #008080; color: #FFFFFF;}
This code is an example of what?
A) A rule
B) A value
C) A declaration
D) A property - ANSWERS A rule
, Consider the following code to create a search field:
input type="search" name="search"
What occurs if the input type of "search" is not supported by a browser?
A) When text is entered into the field, the right side of the field will display an "X," which can be
used to clear the text.
B) The search field will not display on the page.
C) The search field will display on the page but will not allow any user input.
D) The search field will degrade to a standard text box. - ANSWERS The search field will degrade
to a standard text box.
Consider the following code:
<style>
h3~p {
color: #008080;
}
</style>
What does this code do?
A) It formats every <p> element that is preceded by an <h3> element as teal text.
B) It formats every <h3> element that is followed by a <p> element as teal text.
C) It formats the first <p> element that is preceded by an <h3> element as teal text.
D) It formats the first <h3> element that is followed by a <p> element as teal text. - ANSWERS It
formats every <p> element that is preceded by an <h3> element as teal text.