0% found this document useful (0 votes)
3 views6 pages

HTML5 and JavaScript Quiz Questions

This document contains 12 questions about concepts and elements of HTML5 at different levels of difficulty. The questions cover topics such as doctypes, semantic elements, inputs, videos, canvas, geolocation, local storage, and more.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

HTML5 and JavaScript Quiz Questions

This document contains 12 questions about concepts and elements of HTML5 at different levels of difficulty. The questions cover topics such as doctypes, semantic elements, inputs, videos, canvas, geolocation, local storage, and more.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTML5 Questions

1. Which of the following Doctype would you use for a document?


HTML5?

● <!doctype html5>

● <!doctype html>

2. Select the element in which you would include the navigation links
primary of a site:

● <section>
● <menu>
● <header>
● <nav>

3. Which of the following uses of the <script> element do you find the most
appropriate?

● <script src="[Link]"></script>
● <script src="[Link]" />
● <script type="text/javascript" src="[Link]"></script>

4. Select the invalid element:

● <meter>
● <hgroup>
● <progress>

5. Which of the following scripts is generally used to detect


Capabilities of JS, HTML5, and CSS3 in the browser?

● HTML5 Shim
● Google Detector
● Selectivizr
● Modernizr

6. Select the valid input type

● type="boolean"
● type="textarea"
● type="alphanumeric"
● type="range"
7. If you had to create a search field, what would be the most appropriate?

● <input type="find" />


● <input type="text" search />
● <input type="search" />

8. Which of the following attributes allows you to display a default value in a


input element, but it gets cleared when we focus on it?

● content
● placeholder
● source
● value

9. If you were designing a blog, which of the following elements


would you put the links to files, categories, social media icons, links to
most popular articles, etc?


● <section>

10. For an input to have focus as soon as the document finishes loading,
Which of the following solutions would you apply?

● Use the boolean attribute autofocus


● Use the attribute autofocus="true"
● Use the placeholder attribute

11. What change could be considered the most important for the element
<a> in HTML5?

● You can point to two different pages at the same time.


● It is no longer of the 'inline' type and can now contain any other element inside (e.g. h1, p, etc.)
● The new placeholder attribute

12. What is the content within the <canvas> tag used for?

● It appears as a link, which when clicked shows us the canvas.


● It is the alternative content that is displayed only by browsers that do not support canvas.

● It is the text that we can add to the canvas as a title.

Intermediate Level

Which of these is not a valid attribute for the video element?

● controls
● autoplay
● loop
● download

2. Using the API for the video element, which of the following events
we must "listen" to create a custom timer for a video
(e.g.: 10:22)?

● timelistener
● time update
● time counter
● videomove

3. What is the default value of an input of type (type) range?

● The minimum value


● The average value

● The maximum value

4. In the Geolocation API, what are the two attributes or properties of


object "Position"?

● coords and timestamp


● coords and altitude
● latitude and altitude
● latitude and longitude

5. Select the correct way to obtain the value stored in the key
"exam" through localStorage:

● [Link]("exam")
● [Link]("exam")
● [Link]("exam")

6. Using the Canvas API, how would you save a generated canvas?
programmatically to a png file?

● [Link]("image/png")
● [Link]("png")
● [Link]('image/png')

7. It is possible to manipulate an image through the canvas element and convert it,
for example to black and white. Is this also possible for a video?

● Yes
● No
8. Select the invalid attribute for an input:

● required
● autofocus
● pattern
● source

9. How can we indicate that an input is associated with a form in the


which one is not nested?

● Using the 'inputs' attribute in the form


● Using the 'form' attribute in the input.
● It can’t be done.

10. The datalist element:

● It is used to associate a list of options with an input (which uses the 'list' attribute with the id of the datalist).

● It is used to associate a list of options with a select (which uses the "list" attribute with the id of the datalist).

● It is a list-type element, similar to 'ol' or 'ul'.


● It is an element to associate 'meta' elements
Javascript Questions
What is the difference between == and ===?

The double equals operator (==): compares 2 values BUT it does so without checking the type of the values.
variables. Instead, the triple equal operator (===) checks the content of the variable and
also, check that the two variables are of the same type.

You might also like