WGU C77 WEB DEVELOPMENT APPLICATION r r r r
S/ WGU C77 OA EXAM 2024 ANDPRACTICE QUE
r r r r r r r r
STIONS 300 QUESTIONS WITHDETAILED VERI r r r r r
FIED ANSWERS AND RATIONALES /A+ GRADE
r r r r r r
ASSURED
Which Canvas application programming interface (API) met
r r r r r r
hod should a developer use to add the line to the drawnpath on
r r r r r r r r r r r r r r
a canvas?
r
A) closePath()
r r
B) stroke() r
C) fill()
D) beginPath() - ...ANSWER...stroke() r r
Which method of the Geolocation application programming inte
r r r r r r r
rface (API) should a developer use to get periodic updatesof a use
r r r r r r r r r r r r
r's coordinates?
r
A) getCurrentLocation()
r r
B) watchPosition()
r
C) clearWatch()
D) toString() - ...ANSWER...watchPosition() r r
Which of the following would be the best method to use forfloa
r r r r r r r r r r r r
ting images to the left and right of text in HTML5?
r r r r r r r r r r
A) The height attribute of the <img> elementB)
r r r r r r r r r
The width attribute of the <img> element C) CS
r r r r r r r r
S classes
r
D) The inline CSS style attribute - ....ANSWER...CSS classes
r r r r r r r r
,Why is implementing the liquid layout using CSS the preferred m
r r r r r r r r r r
ethod of designing Web pages for mobile devices?A) Because the
r r r r r r r r r r
size of each element is fixed and you can manually change its heig
r r r r r r r r r r r r r
ht and width by applying CSS styles to it
r r r r r r r r
B) Because the liquid layout using CSS is the page- r r r r r r r r
layoutmethod native to all mobile apps r r r r r r
C) Because the liquid layout enables you to assign specific pixel r r r r r r r r r r
widths to elements using the HTML5 structural elementsor the <d
r r r r r r r r r r
iv> tag r
D) Because the size of each element is flexible and will change dy r r r r r r r r r r r
namically depending on the size of the browser window - r r r r r r r r r
....ANSWER...Because the size of each element is flexible and w
r r r r r r r r r r
ill change dynamically depending on the size ofthe browser wind
r r r r r r r r r r
ow
Remy Sharp has created a script that has become the de factostan
r r r r r r r r r r r r
dard for many Web developers around the world. The script ena
r r r r r r r r r r
bles Web developers to:
r r r
A) use CSS1 and CSS2 with HTML5. B) s
r r r r r r r r
upport HTML5 in Chrome browsers.C) su r r r r r r
pport HTML5 in Firefox browsers.r r r r
D) support HTML5 in older IE browsers. -
r r r r r r r
....ANSWER...support HTML5 in older IE browsers. r r r r r
If you want a particular block-
r r r r r
level element to always appearat the upper-
r r r r r r r
right corner of the browser window, no matter how far down a us
r r r r r r r r r r r r
er scrolls on the page, which type of CSS positioning should you
r r r r r r r r r r r r
apply?
A) Relative r r
B) Absolute r r
C) Fixed r
D) Static - ....ANSWER...Fixed
r r r
,Given the following markup: r r r
script
function dragOver(event) { r r
}
function drag(event) { r r
event.dataTransfer.setData("id", event.target.id);
r r
}
function drop(event) { r r
var id = event.dataTransfer.getData("id");
r r r r
event.target.appendChild(document.getElementById(id));
r
}
/script
<section id="target" ondragover="dragOver(event)"ondrop
r r r
="drop(event)"/>
<img id="source" src="image.png" draggable="true"o
r r r r
ndragstart="drag(event)"/>
Which statement should a developer add to the dragOver functi
r r r r r r r r r
on to allow the image to be dragged and dropped ontothe sectio
r r r r r r r r r r r r
n element?
r
A) event.type = "acknowledge";
r r r r
B) event.cancelBubble = true; C)
r r r r r
event.stopPropagation();
D) event.preventDefault(); -
r r
...ANSWER...event.preventDefault();
Which line of code should a developer use to create aninte
r r r r r r r r r r r
rface that can retrieve data in a client browser?
r r r r r r r r
A) new XMLHttpRequest(); r
B) new { "AjaxObject":"xml" } r r r r
C) script src = "ajax" / script
r r r r r r
, D) script src = "jquery-1.8.21.min.js" / script -
r r r r r r r
...ANSWER...new XMLHttpRequest(); r
Given the following HTML code:
r r r r
<ul>
<li>One</li>
r
<li>Two</li>
r
</ul>
Which jQuery code segment inserts an item at the beginningof t
r r r r r r r r r r r
he list? r
A) $("ul > li").append("<li>Zero</li>");
r r r r
B) $("ul").prepend("<li>Zero</li>");
r
C) $("ul > li").after("<li>Zero</li>");
r r
D) $("ul").before("<li>Zero</li>"); - r
...ANSWER...$("ul").prepend("<li>Zero</li>");
Which HTML tag provides ways for users to enterinf
r r r r r r r r r
ormation on forms? r r
A) <button> r r
B) <img> C) r r
<input>
r
D) <title> - ...ANSWER...<input>
r r r
Which HTML input type allows for mailto: address entry?A)
r r r r r r r r r r
file
B) number r r
C) url r
D) hidden - ...ANSWER...url
r r r
Which form attribute limits the number of characters for aninp
r r r r r r r r r r
ut field?
r
A) size B r r
) value
r
S/ WGU C77 OA EXAM 2024 ANDPRACTICE QUE
r r r r r r r r
STIONS 300 QUESTIONS WITHDETAILED VERI r r r r r
FIED ANSWERS AND RATIONALES /A+ GRADE
r r r r r r
ASSURED
Which Canvas application programming interface (API) met
r r r r r r
hod should a developer use to add the line to the drawnpath on
r r r r r r r r r r r r r r
a canvas?
r
A) closePath()
r r
B) stroke() r
C) fill()
D) beginPath() - ...ANSWER...stroke() r r
Which method of the Geolocation application programming inte
r r r r r r r
rface (API) should a developer use to get periodic updatesof a use
r r r r r r r r r r r r
r's coordinates?
r
A) getCurrentLocation()
r r
B) watchPosition()
r
C) clearWatch()
D) toString() - ...ANSWER...watchPosition() r r
Which of the following would be the best method to use forfloa
r r r r r r r r r r r r
ting images to the left and right of text in HTML5?
r r r r r r r r r r
A) The height attribute of the <img> elementB)
r r r r r r r r r
The width attribute of the <img> element C) CS
r r r r r r r r
S classes
r
D) The inline CSS style attribute - ....ANSWER...CSS classes
r r r r r r r r
,Why is implementing the liquid layout using CSS the preferred m
r r r r r r r r r r
ethod of designing Web pages for mobile devices?A) Because the
r r r r r r r r r r
size of each element is fixed and you can manually change its heig
r r r r r r r r r r r r r
ht and width by applying CSS styles to it
r r r r r r r r
B) Because the liquid layout using CSS is the page- r r r r r r r r
layoutmethod native to all mobile apps r r r r r r
C) Because the liquid layout enables you to assign specific pixel r r r r r r r r r r
widths to elements using the HTML5 structural elementsor the <d
r r r r r r r r r r
iv> tag r
D) Because the size of each element is flexible and will change dy r r r r r r r r r r r
namically depending on the size of the browser window - r r r r r r r r r
....ANSWER...Because the size of each element is flexible and w
r r r r r r r r r r
ill change dynamically depending on the size ofthe browser wind
r r r r r r r r r r
ow
Remy Sharp has created a script that has become the de factostan
r r r r r r r r r r r r
dard for many Web developers around the world. The script ena
r r r r r r r r r r
bles Web developers to:
r r r
A) use CSS1 and CSS2 with HTML5. B) s
r r r r r r r r
upport HTML5 in Chrome browsers.C) su r r r r r r
pport HTML5 in Firefox browsers.r r r r
D) support HTML5 in older IE browsers. -
r r r r r r r
....ANSWER...support HTML5 in older IE browsers. r r r r r
If you want a particular block-
r r r r r
level element to always appearat the upper-
r r r r r r r
right corner of the browser window, no matter how far down a us
r r r r r r r r r r r r
er scrolls on the page, which type of CSS positioning should you
r r r r r r r r r r r r
apply?
A) Relative r r
B) Absolute r r
C) Fixed r
D) Static - ....ANSWER...Fixed
r r r
,Given the following markup: r r r
script
function dragOver(event) { r r
}
function drag(event) { r r
event.dataTransfer.setData("id", event.target.id);
r r
}
function drop(event) { r r
var id = event.dataTransfer.getData("id");
r r r r
event.target.appendChild(document.getElementById(id));
r
}
/script
<section id="target" ondragover="dragOver(event)"ondrop
r r r
="drop(event)"/>
<img id="source" src="image.png" draggable="true"o
r r r r
ndragstart="drag(event)"/>
Which statement should a developer add to the dragOver functi
r r r r r r r r r
on to allow the image to be dragged and dropped ontothe sectio
r r r r r r r r r r r r
n element?
r
A) event.type = "acknowledge";
r r r r
B) event.cancelBubble = true; C)
r r r r r
event.stopPropagation();
D) event.preventDefault(); -
r r
...ANSWER...event.preventDefault();
Which line of code should a developer use to create aninte
r r r r r r r r r r r
rface that can retrieve data in a client browser?
r r r r r r r r
A) new XMLHttpRequest(); r
B) new { "AjaxObject":"xml" } r r r r
C) script src = "ajax" / script
r r r r r r
, D) script src = "jquery-1.8.21.min.js" / script -
r r r r r r r
...ANSWER...new XMLHttpRequest(); r
Given the following HTML code:
r r r r
<ul>
<li>One</li>
r
<li>Two</li>
r
</ul>
Which jQuery code segment inserts an item at the beginningof t
r r r r r r r r r r r
he list? r
A) $("ul > li").append("<li>Zero</li>");
r r r r
B) $("ul").prepend("<li>Zero</li>");
r
C) $("ul > li").after("<li>Zero</li>");
r r
D) $("ul").before("<li>Zero</li>"); - r
...ANSWER...$("ul").prepend("<li>Zero</li>");
Which HTML tag provides ways for users to enterinf
r r r r r r r r r
ormation on forms? r r
A) <button> r r
B) <img> C) r r
<input>
r
D) <title> - ...ANSWER...<input>
r r r
Which HTML input type allows for mailto: address entry?A)
r r r r r r r r r r
file
B) number r r
C) url r
D) hidden - ...ANSWER...url
r r r
Which form attribute limits the number of characters for aninp
r r r r r r r r r r
ut field?
r
A) size B r r
) value
r