Pre-Summer Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

IT Specialist INF-306 HTML5 Application Development Exam Practice Test

Page: 1 / 7
Total 68 questions

HTML5 Application Development Questions and Answers

Question 1

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:

Question # 1

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.

Question # 1

Options:

Question 2

You need to create the following form:

Question # 2

Complete the code by selecting the correct option from each drop-down list.

Question # 2

Options:

Question 3

Which markup segment creates an SVG ellipse?

Options:

A.

< svg height= " 140 " width= " 500 " > < ellipsp x= " 200 " y= " 80 " rx= " 100 " ry= " 50 " fill= " green " stroke-width= " 2 " / > < /svg >

B.

< svg height= " 140 " width= " 500 " > < ellipse x= " 200 " y= " 80 " x= " 100 " y= " 50 " fill= " green " stroke-width= " 2 " / > < /svg >

C.

< svg height= " 140 " width= " 500 " > < ellipse cx= " 200 " cy= " 80 " x= " 100 " y= " 50 " fill= " green " stroke-width= " 2 " / > < /svg >

D.

< svg height= " 140 " width= " 500 " > < ellipse cx= " 200 " cy= " 80 " rx= " 100 " ry= " 50 " fill= " green " stroke-width= " 2 " / > < /svg >

Question 4

Which element should you use to rotate an SVG square?

Options:

A.

animateMotion

B.

animateTransform

C.

circle

D.

path

Question 5

Which JavaScript method is used to draw a circle on a canvas?

Options:

A.

circle

B.

ellipse

C.

arc

D.

bezierCurveTo

Question 6

You need to identify the form elements.

Move the appropriate semantic elements from the list on the left to the correct locations on the right.

Note: You will receive partial credit for each correct response.

Question # 6

Options:

Question 7

You need to display the following user interface:

Motorcycle

Truck

Boat

Car

Bicycle

Complete the markup by selecting the correct option from each drop-down list.

Question # 7

Options:

Question 8

Move the appropriate attributes from the list on the left to the correct descriptions on the right. You may use each attribute once, more than once, or not at all.

Note: You will receive partial credit for each correct match.

Question # 8

Options:

Question 9

Review the grid container requirements and mockup on the left. Which markup should you use to define the grid container?

Options:

A.

Uses grid-template-columns and grid-template-rows with percentage and pixel sizing.

B.

Incorrectly places named area strings under grid-template-rows.

C.

Incorrectly places named area strings under grid-template-columns.

D.

.grid-container { display: grid; grid-template-areas: " heading heading heading heading heading heading " " menu content content content right right " " menu contact contact contact contact contact " ; grid-gap: 10px; background-color: orange; padding: 10px;}

Question 10

You are creating a form that requires the category to be entered as a two- or three-letter abbreviation. The input is mandatory.

You need to configure the input validation for the form.

Complete the markup by typing into the boxes.

Note: You will receive partial credit for each correct answer.

Question # 10

Options:

Question 11

The following form is missing validation attributes:

< form >

< div class= " container " >

< h1 > Register Here < /h1 >

< p > Please fill in the details to create an account with us. < /p >

< hr >

< label for= " ? " > < b > Enter Email < /b > < /label >

< input type= " ? " placeholder= " Enter Email " name= " ? " placeholder= " username@domain.com " >

< label for= " ? " > < b > Password < /b > < /label >

< input type= " ? " placeholder= " Enter Password " name= " ? " >

< label for= " ? " > < b > Confirm Password < /b > < /label >

< input type= " ? " placeholder= " Confirm Password " name= " ? " >

< label for= " phone " > < b > Phone < /b > < /label >

< input type= " tel " id= " phone " name= " phone " placeholder= " 123-45-678 " >

< hr >

< p > By creating an account you agree to our < a href= " # " > Terms & Privacy < /a > . < /p >

< button type= " submit " class= " registerbtn " > < strong > Register < /strong > < /button >

< /div >

< /form >

You need to update the form to enforce the following requirements for visitors:

• All fields must be completed with valid information.

• The users should not be allowed to type passwords longer than 8 characters.

• Passwords must use only numbers and letters.

• Phone numbers and email addresses must follow the configuration of the placeholder text.

• The browser must display an error message that makes it clear what type of input change is needed.

Review the markup on the left.

Complete the sentences by selecting the correct option from each drop-down list.

Note: You will receive partial credit for each correct selection.

Question # 11

Options:

Question 12

Which markup segment uses the output element to display the combined value of two input elements in HTML5?

Options:

A.

< form > < input type= " number " name= " a " value= " 50 " / > + < input type= " number " name= " b " value= " 50 " / > = < output name= " c " for= " a b " > a+b < /output > < /form >

B.

< form oninput= " a.value+b.value " > < input type= " number " name= " a " value= " 50 " / > + < input type= " number " name= " b " value= " 50 " / > < /form >

C.

< form oninput= " c.value=a.value+b.value " > < input type= " number " name= " a " value= " 50 " / > + < input type= " number " name= " b " value= " 50 " / > = < output name= " c " for= " a b " > < /output > < /form >

D.

< form > < input type= " number " name= " a " value= " 50 " / > + < input type= " number " name= " b " value= " 50 " / > = < output name= " c " for= " a b " > < /output > < /form >

Question 13

You write the following JavaScript code. Line numbers are included for reference only.

01 < script >

02

03 beststudent = new Student( " David " , " Hamilton " );

04 document.write(beststudent.fullname + " is registered. " );

05 < /script >

You need to write a function that will initialize and encapsulate the member variable fullname.

Which code fragment could you insert at line 02 to achieve this goal?

Note: Each correct answer presents a complete solution.

Options:

A.

function Student(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; this.fullname = this.firstname + " " + this.lastname;}

B.

var student(firstName, lastName) { firstname = firstName; lastname = lastName; fullname = firstname + " " + lastname;}

C.

var Student(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; this.fullname = this.firstname + " " + this.lastname;}

D.

function Student(firstName, lastName) { firstname = firstName; lastname = lastName; fullname = firstname + " " + lastname;}

Question 14

You write the following markup to create a page. Line numbers are included for reference only.

01 < !DOCTYPE html >

02 < html >

03 < head >

04 < style >

05

10 < /style >

11 < /head >

12 < body >

13 < svg height= " 500 " width= " 500 " >

14 < defs >

15 < filter id= " f2 " x= " 0 " y= " 0 " width= " 200% " height= " 200% " >

16 < feOffset result= " offOut " in= " SourceGraphic " dx= " 20 " dy= " 20 " / >

17 < feGaussianBlur result= " blurOut " in= " offOut " stdDeviation= " 10 " / >

18 < feBlend in= " SourceGraphic " in2= " blurOut " mode= " normal " / >

19 < /filter >

20 < /defs >

21 < text x= " 10 " y= " 100 " style= " fill:red; " > Blur Me! < /text >

22 Sorry, your browser does not support inline SVG.

23 < /svg >

24 < /body >

25 < /html >

An SVG blur filter is defined in the markup on the left. You need to apply the SVG blur filter to the text element on the page.

Which CSS code should you insert at line 05?

Options:

A.

text { font: 48px arial bold; filter: #blur;}

B.

text { filter: url( " #f2 " ); font-size: 50pt; color: red;}

C.

text { font: 48px arial bold; fill: blur;}

D.

text { font: 48px arial bold; filter: url(blur);}

Question 15

Which two statements correctly describe media queries? Choose 2.

Options:

A.

Media queries improve the performance of your web page.

B.

Media queries support responsive web design.

C.

Media queries allow you to apply different CSS rules on various screens/breakpoints.

D.

Media queries can process JavaScript code dynamically.

Question 16

You need to implement media queries for the responsive layout of a new website.

Low-resolution wireframes for the desktop, tablet, and mobile layouts are shown.

Question # 16

Options:

Question 17

You are creating a dietary request form for an upcoming conference. The form must include the following elements:

• The title " Conference Registration Form "

• A Name input field for the attendee ' s name

• A list of food options the attendee can select by using the mouse or typing

Complete the code by moving the appropriate code segments from the list on the left to the correct locations on the right. You may use each code segment once, more than once, or not at all.

Note: You will receive partial credit for each correct response.

Question # 17

Options:

Question 18

You are creating a form that asks a user to enter their phone number. The form must be submitted only if the phone number field is not empty and matches the format 111-444-7777. Which markup should you use?

Options:

A.

< input type= " tel " name= " phone " maxlength= " 12 " required >

B.

< input type= " tel " name= " phone " pattern= " [0-9]{3}[0-9] {3}[0-9]{4} " >

C.

< input type= " tel " name= " phone " pattern= " [1]{3}-[4] {3}-[7]{4} " required >

D.

< input type= " tel " name= " phone " pattern= " [0-9]{3}-[0-9] {3}-[0-9]{4} " required >

Question 19

Review the following markup segment:

< form action= " process.js " method= " get " >

< label for= " secretcode " > Secret Code < /label >

< input type= " text " name= " secretcode "

pattern= " [a-zA-Z]{4}-[0-9] {2}-[0-9]{4}-[a-zA-Z] {4} "

placeholder= " secretcode " >

< input type= " submit " value= " Submit " >

< /form >

Which entry will validate successfully according to the required pattern?

Options:

A.

Kgyn-23-3978-Uhj6

B.

y7Ts-A3-4876-ASFr

C.

AGbe-23h-234-HBG6

D.

kukX-34-4938-WJDF

Question 20

You are given the design for an app. The project manager asks you to outline the steps you must take to release and maintain the app.

Move each step from the list on the left to its correct sequence in the application lifecycle on the right.

Note: You will receive partial credit for each correct response.

Question # 20

Options:

Page: 1 / 7
Total 68 questions