HTML5 Mock Test



This section presents you various set of Mock Tests related to HTML5 Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

HTML5 Mock Test II

Q 1 - Which of the following input control represents a date consisting of a year and a week number encoded according to ISO 8601 in Web Form 2.0?

A - week

B - time

C - number

D - range

Answer : A

Explanation

'week' input control represents a date consisting of a year and a week number encoded according to ISO 8601.

Q 2 - Which of the following input control represents a time (hour, minute, seconds, fractional seconds) encoded according to ISO 8601 in Web Form 2.0?

A - week

B - time

C - number

D - range

Answer : B

Explanation

'time' input control represents a time (hour, minute, seconds, fractional seconds) encoded according to ISO 8601.

Q 3 - Which of the following input control accepts only numerical value in Web Form 2.0?

A - week

B - time

C - number

D - range

Answer : C

Explanation

'number' input control accepts only numerical value. The step attribute specifies the precision, defaulting to 1.

Q 4 - Which of the following input control is used for input fields that should contain a value from a range of numbers in Web Form 2.0?

A - week

B - time

C - number

D - range

Answer : D

Explanation

'range' input control is used for input fields that should contain a value from a range of numbers.

Q 5 - Which of the following input control is used for input fields that should contain an e-mail address in Web Form 2.0?

A - email

B - url

C - number

D - range

Answer : A

Explanation

'email' input control is used for input fields that should contain an e-mail address.

Q 6 - Which of the following input control is used for input fields that should contain an URL address in Web Form 2.0?

A - email

B - url

C - number

D - range

Answer : B

Explanation

'url' input control is used for input fields that should contain an URL address.

Q 7 - Which of the following tag is used to represent the result of different types of output in HTML5?

A - output

B - placeholder

C - autofocus

D - required

Answer : A

Explanation

HTML5 introduced a new element <output> which is used to represent the result of different types of output, such as output written by a script.

Q 8 - Which of the following tag provides a hint to the user of what can be entered in the field in HTML5?

A - output

B - placeholder

C - autofocus

D - required

Answer : B

Explanation

HTML5 introduced a new attribute called placeholder. This attribute on <input> and <textarea> elements provides a hint to the user of what can be entered in the field. The placeholder text must not contain carriage returns or line-feeds.

Q 9 - Which of the following tag automatically focus one particular form field in HTML5?

A - output

B - placeholder

C - autofocus

D - required

Answer : C

Explanation

This is a simple one-step pattern, easily programmed in JavaScript at the time of document load, automatically focus one particular form field.

Q 10 - Which of the following tag insists to have a value in an input control in HTML5?

A - output

B - placeholder

C - autofocus

D - required

Answer : D

Explanation

HTML5 introduced a new attribute called required which would insist to have a value in an input control.

Q 11 - Can you use SVG tags directly in HTML5 without any plugin?

A - true

B - false

Answer : A

Explanation

Yes! HTML5 allows embeding SVG directly using <svg>...</svg> tag.

Q 12 - Can you use MathML tags directly in HTML5 without any plugin?

A - true

B - false

Answer : A

Explanation

Yes! The HTML syntax of HTML5 allows for MathML elements to be used inside a document using <math>...</math> tags.

Answer : A

Explanation

The Session Storage Data would be deleted by the browsers immediately after the session gets terminated.

Q 20 - Which of the following is correct Content-type header that a server side script should send for SSE in HTML5?

A - Content-Type: text/event-stream

B - Content-Type: text/application-stream

C - Content-Type: text/data-stream

D - None of the above.

Answer : A

Explanation

Server side script should send Content-type header specifying the type text/event-stream.

Q 22 - Which value of Socket.readyState atribute of WebSocket indicates that the connection has not yet been established?

A - 0

B - 1

C - 2

D - 3

Answer : A

Explanation

A value of 0 indicates that the connection has not yet been established.

Q 23 - Which value of Socket.readyState atribute of WebSocket indicates that the connection is established and communication is possible?

A - 0

B - 1

C - 2

D - 3

Answer : B

Explanation

A value of 1 indicates that the connection is established and communication is possible.

Q 24 - Which value of Socket.readyState atribute of WebSocket indicates that the connection is going through the closing handshake?

A - 0

B - 1

C - 2

D - 3

Answer : C

Explanation

A value of 2 indicates that the connection is going through the closing handshake.

Q 25 - Which value of Socket.readyState atribute of WebSocket indicates that the connection has been closed or could not be opened?

A - 0

B - 1

C - 2

D - 3

Answer : D

Explanation

A value of 3 indicates that the connection has been closed or could not be opened.

Answer Sheet

Question Number Answer Key
1 A
2 B
3 C
4 D
5 A
6 B
7 A
8 B
9 C
10 D
11 A
12 A
13 D
14 D
15 C
16 A
17 C
18 D
19 D
20 A
21 C
22 A
23 B
24 C
25 D
html5_questions_answers.htm
Advertisements