HTML Questions & Answers – HTML5 Introduction – 2

1. Which of the following defines the title of a work?
a) <cite>
b) <hr>
c) <a>
d) <address>View Answer

Answer: a
Explanation: The <cite> tag defines the title of a work. The <hr> tag is used to give a horizontal break. When we want to link one page to another, then <a> tag is used. The <address> tag is used to define the contact information about owner of document.

Answer: a
Explanation: <time> tag wrap single piece of information i.e. it defines date, month and year. The <nav> element identifies a set of navigation links, <footer> is introduced in HTML5 which is present at the end of page and do conatins footer information i.e copyright information.

Answer: a
Explanation: The <main> element must NOT be a descendant of an <article>, <aside>, <footer>, <header>, or <nav> element. The article element may contain audio/video clips, images and also text or embedded content.

4. Which of the following statement is true?
a) Canvas Contains built-in animations
b) SVG needs scripts to draw elements
c) In canvas, drawing is done with pixels
d) SVG don’t support to event handlersView Answer

Answer: c
Explanation: In SVG drawing is done with vectors and it support event handlers. Canvas doesn’t contains any built-in-animations and drawing is done with pixels.

Answer: c
Explanation: <header> element contains navigation links. Slidebar is for hoverable/sliding text. <footer> is introduced in HTML5 which is present at the end of page and do contains footer information i.e copyright information. Main content is the entire article which wraps the <article> element. It holds the page’s main content. It can be useful for screen readers. E.g. <main> <article>…………</article> </main>

advertisement

6. Which of the following is not sectioning elements?
a) <article>
b) <aside>
c) <nav>
d) <header>View Answer

Answer: d
Explanation: The <section> element represents a section of a document or application. Tags like <article>, <aside>, <nav>, <section> are the ones that create a nested, new outline inside the page.

7. How many times can HTML5 events be fired?
a) Multiple
b) One
c) Only two
d) ZeroView Answer

Answer: a
Explanation: We can call events like drag, ondragover, etc multiple times in HTML5.

8. Which element is used to get highlighted text in HTML5?
a) <highlight>
b) <b>
c) <mark>
d) <u>View Answer

Answer: c
Explanation: The <mark> element is used to highlight a section of text. It is useful for quoting a text or if one wants to bring attention to the text. The <b> tag is used to make text/paragraph bold. <u> tag is used to underline the text you wanted.