INF-306 HTML5 Application Development Questions and Answers
You have created custom error messages for a form. When a user attempts to submit the form with invalid data, the following must occur:
• The data must remain in the form.
• Error messages must be displayed.
Which Event property or method should you use?
You need to create the layout shown, which defines five content areas:
Logo and page title
Menu
Main content area
Additional content area
Copyright and contact information
You define the following classes:
The development team just released a new version of an app for your team to test. Which three tasks should you perform during testing? Choose 3.
You need to correctly apply a style rule for screen devices with a width of 480 pixels or less.
Complete the code by selecting the correct option from the drop-down list.
The following two images show a web page that uses a responsive layout displayed on a mobile device and on a PC.
Displayed on a mobile device:
The layout stacks the content vertically.
Displayed on a computer monitor:
The layout displays the content cards horizontally in multiple columns.
Review the images on the left.
Complete the statements by selecting the correct option from each drop-down list.
Review the grid container requirements and mockup on the left. Which markup should you use to define the grid container?
Review the images on the left.
Complete the statements by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct selection.
Match each property to its corresponding value for creating the CSS flexible box layout.
Move each property from the list on the left to the correct value on the right.
Note: You will receive partial credit for each correct match.
You need to call a function named process when a user clicks a button.
Complete the code by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct selection.
The following code adds items to the groceries array from the other arrays. Line numbers are for reference only.
01 < body >
02 < p id= " list " > < /p >
03 < script >
04 var groceries = [];
05 var dairy = [ " Milk " , " Eggs " , " Cheese " , " Ice Cream " ];
06 var beverages = [ " Juice " , " Water " , " Soda " , " Coffee " ];
07 var fruits = [ " Apples " , " Bananas " , " Grapes " , " Oranges " , " Strawberries " ];
08 var vegetables = [ " Broccoli " , " Carrots " , " Lettuce " , " Spinach " , " Tomatoes " ];
09 var meats = [ " Beef " , " Chicken " , " Pork " ];
10
11 function addVegetables() {
12 groceries = groceries.concat(vegetables);
13 }
14
15 function addFruits() {
16 groceries = groceries.concat(fruits);
17 }
18
19 function addOther() {
20 groceries.push(meats[1]);
21 groceries.push(dairy[3]);
22 }
23
24 fruits.shift();
25 addVegetables();
26
27 groceries.shift();
28 addFruits();
29
30 groceries.pop();
31 groceries.shift();
32
33 addOther();
34 document.getElementById( " list " ).innerHTML = groceries;
You need to debug the code on the left to determine how many items are in the groceries array at the specified breakpoints.
Evaluate the code and answer the questions by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct answer.
You define the Pet class as follows:
class Pet {
constructor(name, breed) {
this.name = name;
this.breed = breed;
this.show = function() {
var text = " < p > Your pet ' s name is " + name + " . The pet ' s breed is " + breed + " . < /p > " ;
return text;
};
}
}
You need to derive a Dog class from the Pet class.
Complete the code by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct selection.
Which value does the following JavaScript code fragment store in the variable num?
var num = localStorage.length;
Match each stage of Application Lifecycle Management to the task that occurs during that stage.
Move each stage from the list on the left to the correct task on the right.
Note: You will receive partial credit for each correct match.
The following output has more text than will fit in the element.
You need to apply CSS to contain the text inside the element ' s border without creating unneeded scrollbars or losing text. Which attribute setting should you use?
You need to use a flexbox so that new content you add to the container appears at the highest point on a vertical list. You want to achieve this goal without specifying an order. Which value should you use for flex-direction?
Which two application features should you implement by using session storage? Choose 2.







