Applications – OA Exam & Practice
Questions | 300 Questions with Detailed
Verified Answers and Rationales (A+
Graded)
Which Canvas application programming interface (API)
method should a developer use to add the line to the drawn
path on a canvas?
A) closePath()
B) stroke()
C) fill()
D) beginPath() - ...ANSWER...stroke()
Which method of the Geolocation application programming
interface (API) should a developer use to get periodic updates
of a user's coordinates? A) getCurrentLocation()
B) watchPosition()
C) clearWatch()
D) toString() - ...ANSWER...watchPosition()
Which of the following would be the best method to use for
floating images to the left and right of text in HTML5?
A) The height attribute of the <img> element
B) The width attribute of the <img> element
,C) CSS classes
D) The inline CSS style attribute - ....ANSWER...CSS classes
Why is implementing the liquid layout using CSS the
preferred method of designing Web pages for mobile
devices? A) Because the size of each element is fixed and
you can manually change its height and width by applying
CSS styles to it
B) Because the liquid layout using CSS is the page-layout
method native to all mobile apps
C) Because the liquid layout enables you to assign specific
pixel widths to elements using the HTML5 structural
elements or the <div> tag
D) Because the size of each element is flexible and will
change dynamically depending on the size of the browser
window - ....ANSWER...Because the size of each element is
flexible and will change dynamically depending on the size
of the browser window
Remy Sharp has created a script that has become the de facto
standard for many Web developers around the world. The
script enables Web developers to:
A) use CSS1 and CSS2 with HTML5.
B) support HTML5 in Chrome browsers.
C) support HTML5 in Firefox browsers.
D) support HTML5 in older IE browsers. -
....ANSWER...support HTML5 in older IE browsers.
If you want a particular block-level element to always appear
at the upper-right corner of the browser window, no matter
how far down a user scrolls on the page, which type of CSS
positioning should you apply?
A) Relative
,B) Absolute
C) Fixed
D) Static - ....ANSWER...Fixed
Given the following markup: script
function dragOver(event) {
}
function drag(event) {
event.dataTransfer.setData("id", event.target.id);
}
function drop(event) {
var id = event.dataTransfer.getData("id");
event.target.appendChild(document.getElementById(id));
}
/script
<section id="target" ondragover="dragOver(event)"
ondrop="drop(event)"/>
<img id="source" src="image.png" draggable="true"
ondragstart="drag(event)"/>
Which statement should a developer add to the dragOver
function to allow the image to be dragged and dropped onto
the section element?
A) event.type = "acknowledge";
B) event.cancelBubble = true;
C) event.stopPropagation();
D) event.preventDefault(); -
...ANSWER...event.preventDefault();
Which line of code should a developer use to create an
interface that can retrieve data in a client browser?
, A) new XMLHttpRequest();
B) new { "AjaxObject":"xml" }
C) script src = "ajax" / script
D) script src = "jquery-1.8.21.min.js" / script -
...ANSWER...new XMLHttpRequest();
Given the following HTML code:
<ul>
<li>One</li>
<li>Two</li>
</ul>
Which jQuery code segment inserts an item at the beginning
of the list?
A) $("ul > li").append("<li>Zero</li>");
B) $("ul").prepend("<li>Zero</li>");
C) $("ul > li").after("<li>Zero</li>");
D) $("ul").before("<li>Zero</li>"); -
...ANSWER...$("ul").prepend("<li>Zero</li>");
Which HTML tag provides ways for users to enter
information on forms?
A) <button>
B) <img>
C) <input>
D) <title> - ...ANSWER...<input>
Which HTML input type allows for mailto: address entry?
A) file
B) number
C) url
D) hidden - ...ANSWER...url