Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following is correct about custom attributes in HTML5?

Answer»

Which of the following is CORRECT about custom attributes in HTML5?
Choose the correct option from below list
(1)A custom data attribute starts with data- and would be NAMED based on the requirement.
(2)The values of these attributes can be retrieved using JavaScript APIS or CSS, SIMILAR to standard attribute.
(3)Both of the above.
(4)None of the above

Answer:-(3)Both of the above.

2.

Syntax to highlight text in HTML5?

Answer» SYNTAX to highlight text in HTML5?
While working in HTML5 PAGE we USE < MARK> tag and it is EASY and quick way of highlighting or marking text on the page and below is the syntax to do that:-


Mark Tag
And in plain HTML code we need to add some extra properties like background-color style as given below, by using below HTML tag.


highlight Tag
3.

What is the best way to hide a checkbox if we are replacing it with an image?

Answer»

What is the best WAY to hide a checkbox if we are replacing it with an IMAGE?
To hide a checkbox if we are replacing checkbox with image we NEED to do the OPACITY to 0
opacity:0

4.

Why we specify a doctype in an HTML page?

Answer»

Why we specify a DOCTYPE in an HTML page?
The main REASON of using doctype in HTML page is that to interpreate HTML5 specific tags it is NECESSARY to add if we have donot add this the NEW tag included in HTML5 will not be interpreate.

5.

Name the different kinds of Doctypes available in HTML?

Answer» NAME the different kinds of Doctypes AVAILABLE in HTML?
Below are the THREE kinds of doctypes available in HTML
(1)Strict Doctype
(2)TRANSITIONAL Doctype
(3)FRAMESET Doctype
6.

Which of the following is not a value of the attribute display?

Answer»

Which of the following is not a value of the ATTRIBUTE DISPLAY?
Choose the correct option from below list
(1)inline-flex
(2)flexbox
(3)flex
(4)grid

Answer:-(2)flexbox

7.

Can we get the gepgraphical location of users in HTML5 code?

Answer»

Can we GET the gepgraphical location of users in HTML5 code?
Yes it is possible to get GEOGRAPHICAL location of user using HTML5. But here we NEED user APPROVAL as this is privacy concerns.
In ORDER to get user position we use getCurrentPosition method and syntax is given below:-
navigator.geolocation.getCurrentPosition(show_map);

8.

SVG is mostly useful for vector type diagrams like

Answer» SVG is mostly USEFUL for vector type diagrams like
(1)Charts and 3D Graphs
(2)3D Graphs
(3)Charts and 2D Graphs
(4)2D Graphs

Answer:-(3)Charts and 2D Graphs
9.

Scalable Vector Graphics are defined in which markup language?

Answer»

Scalable Vector GRAPHICS are defined in which markup language?
(1)HTML5
(2)XML
(3)Native HTML
(4)DHTML

Answer:-(2)XML

10.

Web Apps can start faster and work even if there is no internet connection when you use

Answer»

Web Apps can start FASTER and work EVEN if there is no INTERNET connection when you use
(1)App CACHE
(2)Local Storage
(3)Cloud
(4)SESSION Storage

Answer:-(1)App Cache

11.

The method used to create a linear gradient is

Answer»

The method used to CREATE a linear gradient is
Choose the correct OPTION from below LIST
(1)createLinearGradient(x,y,x1,y1)
(2)createLinearGradient(x,y,z,x1,y1)
(3)createLinearGradient(x,y)
(4)createLinearGradient(x,y,z,x1,y1,z1)

ANSWER:-(1)createLinearGradient(x,y,x1,y1)

12.

Code to create iFrame in HTML5 with exmaple and code?

Answer»

Code to CREATE iFrame in HTML5 with EXMAPLE and code?
Below is the code to create a iFrame in HTML5 with code and the with ATTACHMENT of code.


Download Code



iFrame Code

And output of above Code is:-


iFrame output

13.

Which of the following method is used to draw an image on a canvas?

Answer»

Which of the following method is used to draw an IMAGE on a CANVAS?
(1)drawImg(image,x,y)
(2)writeImg(image,x,y)
(3)drawImage(image,x,y)
(4)writeImage(image,x,y)

Answer:-(3)drawImage(image,x,y)

14.

Which is best suited for applications with large rendering areas e.g.: Google maps?

Answer»

Which is best suited for APPLICATIONS with large rendering AREAS e.g.: Google maps?
(1)SVG
(2)None of the options MENTIONED
(3)CANVAS and SVG
(4)Canvas

Answer:-(1)SVG

15.

How do you embed a video player using

Answer»

How do you embed a VIDEO PLAYER using
(1)VID
(2)src
(3)source
(4)IFRAME

Answer:-(4)iframe

16.

Which for the following API's can be used to suggest near by restaurants in a restaurant finder app?

Answer»

Which for the following API's can be USED to SUGGEST near by restaurants in a restaurant finder app?
(1)Geolocation API
(2)CACHE API
(3)Web Workers
(4)LOCAL Storage

Answer:-(1)Geolocation API

17.

How do you place a canvas element with an ID of canvas1 into a JavaScript variable?

Answer»

How do you place a canvas element with an ID of canvas1 into a JavaScript variable?
(1)VAR canvas1 = getElementById('canvas1');
(2)var canvas1 = document.getElement('canvas1');
(3)var canvas1 = document.get('#canvas1');
(4)var canvas1 = document.getElementById('canvas1');

ANSWER:-(4)var canvas1 = document.getElementById('canvas1');

18.

Which of the following is not true about SVG graphics?

Answer»

Which of the FOLLOWING is not true about SVG GRAPHICS?
(1)Graphics in SVG are defined in XML
(2)SVG is mostly USED for graphs
(3)Graphics in SVG are defined using Java script
(4)SVG's do not lose quality when zoomed

Answer:-(3)Graphics in SVG are defined using Java script

19.

Which of the following is not true about Canvas?

Answer»

Which of the FOLLOWING is not true about Canvas?
(1)Canvas RENDERS GRAPHICS pixel by pixel
(2)Each shape in Canvas is looked at as an object
(3)Canvas draws graphics on the fly using JavaScript
(4)Canvas is well suited for intense graphics

Answer:-(2)Each shape in Canvas is looked at as an object

20.

Which of the following tags represents a section of document used for navigation?

Answer»

Which of the following tags represents a SECTION of document used for NAVIGATION?
(1)section
(2)FOOTER
(3)NAV
(4)navigation

Answer:-(3)nav

21.

Audio element can be programmatically controlled from

Answer»

Audio element can be programmatically controlled from
(1)HTML or CSS or JAVASCRIPT
(2)HTML
(3)JavaScript
(4)CSS

Answer:-(3)JavaScript

22.

Which attribute of the video tag specifies an image to be shown while the video is downloading?

Answer»

Which ATTRIBUTE of the VIDEO tag specifies an image to be SHOWN while the video is downloading?
(1)fig
(2)poster
(3)src
(4)img

Answer:-(2)poster

23.

What are HTML5 Semantic Elements and there names?

Answer»

What are HTML5 Semantic Elements and there names?
Semantic elements in HTML5 are those elements that will clearly explains the motive or meaning of the element to user. To understand this we will take some SYNTAX of HTML which are semantic and non semantic elements. < div>, < span> and < a> HTML tag doesnot explain what they CONTAIN as contents. And on other HAND < IMG> and < form> elements clearly explain the cotents it can contain.

HTML5 INTRODUCES many of the below new semantic elements:-


HTML5 Semantic Elements

24.

Most useful API that has been added to HTML5?

Answer»

Most useful API that has been added to HTML5?
Below are th list of 10 most useful API added to HTML5
(1)Battery Status:-This API will check the battery status of the device which user is using.
(2)Clipboard:-THis API will copy the data to the clipboard.
(3)Drag and drop:-From this we will SIMPLEY drag and drop item in the APP.
(4)Fetch:-From fetch request of HTTP request is much easier in previous where we USE XMLHTTPRequest.
(5)Form:-Added a new types for validation and rendering.
(6)Geolocation:-From this API we will get the device location but user must accept that of access.
(7)Internalization:-This API has been used for International formatting and string comparison.
(8)Screen Orienation:-This API will check the device screen orientation.
(9)Web Audio:-This API will process audio on the CLIENT side.
(10)Web SOCKETS:-This API will do the real time communication between server and client.

25.

Most popular Audio and Video embedding on an HTML5 web page?

Answer»

Most popular AUDIO and Video EMBEDDING on an HTML5 web PAGE?
Below are the list of 4 most popular audio and 3 video FORMAT on HTML5 web page.
(1)MP3
(2)Ogg Vorbis
(3)Wav
(4)WebM
Popular Video Formats
(1)MP4
(2)Ogg
(3)WebM

26.

Different types of web storages present in HTML5?

Answer»

Different types of web storages PRESENT in HTML5?
There are two types of web storages present in HTML5 given as FOLLOW:-
(1)Local Storage:-In local storage data will be stored in the local storage and data also will not be cleared automatically or when we close the browser.
(2)SESSION Storage:-In session storage users browser current session data will be stored. And if we closed the browser the storage will be cleared.

27.

The method used to create a circular gradient is

Answer»

The METHOD used to create a CIRCULAR gradient is
Choose the correct option from below list
(1)RadialGradient(x,y,X1,Y1)
(2)createRadialGradient(x,y,r,x1,y1,r1)
(3)createRadialGradient(x,y,r)
(4)RadialGradient(x,y,r,x1,y1)

Answer:(2)createRadialGradient(x,y,r,x1,y1,r1)

28.

Canvas Tag in HTML5 with example?

Answer» CANVAS TAG in HTML5 with example?
Canvas components is mainly used to draw representation. And this can be used for rendering graphs, game graphics, or other visual images. To draw on canvas tag we used this in CONJUNCTION with the getContext METHOD. Below is the code will helps you to write code for convas:-
Download Code


Canvas Tag

Output:-



Canvas Tag output

29.

Write down 10 common differences between HTML5 and HTML?

Answer» WRITE down 10 common DIFFERENCES between HTML5 and HTML?
Below are the 10 most common differences between HTML5 and HTML.
30.

Which HTML5 tag would you use to define footer?

Answer»

Which HTML5 tag would you USE to define FOOTER?
(1)BOTTOM
(2)footer
(3)foot
(4)body

Answer:-(2)footer

31.

What is the HTML5 Stack?

Answer»

What is the HTML5 Stack?
(1)HTML5, PHP, MYSQL
(2)HTML5, PHP, JavaScript
(3)HTML5, CSS2, JavaScript
(4)HTML5, CSS3, JavaScript

Answer:-(4)HTML5, CSS3, JavaScript

32.

What is the recommended method to detect browser compatibility for features

Answer»

What is the recommended method to DETECT browser compatibility for features
(1)Use navigator.UserAgent method
(2)Use MODERNIZR
(3)None of the options mentioned
(4)Application AUTOMATICALLY detects

Answer:-(2)Use Modernizr

33.

Which of the following tag represents an independent piece of content of a document in HTML5?

Answer»

Which of the following tag represents an independent PIECE of CONTENT of a DOCUMENT in HTML5?
(1)FOOTER
(2)nav
(3)section
(4)article

Answer:-(4)article

34.

What are the minimum number of tag require in HTML5 to create a Web Page?

Answer»

What are the minimum NUMBER of tag require in HTML5 to CREATE a Web PAGE?
There are minimum 3 tags REQUIRED to create a HTML5 web page and these tags are Head, Body and HTML.

35.

What do you mean by Web SQL Database in HTML5?

Answer»

What do you mean by Web SQL DATABASE in HTML5?
Web SQL is not comes with HTML5 means its a not part of HTML5. With the help of Web SQL we can create web APPS. Web SQL has separate specification which helps in developing web apps. Here Web SQL is used to manage client side database and this will stores data on client side. AS data is stored on client side not on server side. And Web SQL database works only in LATEST versions of Google CHROME, safari and opera browsers.

36.

What do you think if "DOCTYPE HTML" is not put in HTML5?

Answer»

What do you think if DOCTYPE HTML is not put in HTML5?
If we will not put DOCTYPE HTML in html page in HTML5. Browser will not identify that it is an HTML DOCUMENT and HTML5 tags will not FUNCTIONING properly. And below is the image to DECLARE HTML DOCTYPE.


DOCTYPE HTML