HTML Questions and Answers - HTML Fonts Part-2

1. Which works similar to <b> element?
a) <strong>
b) <em>
c) <i>
d) <blockquote>

  Discussion

Answer: a
Explanation: The words written inside <strong> can be said with strong emphasis. Browser shows contents written inside <strong> element in bold.

2. Which element is used for short quote?
a) <q>
b) <blockquote>
c) <em>
d) <abbr>

  Discussion

Answer: a
Explanation: <em> element indicates emphasis, browser will show the contents of <em> element in italic. A section which is quoted from another source is specified by <blockquote>. The <abbr> defines abbreviation. We used <q> element for shorter quote. Browser put quote around <q> element.

3. Which element is used for abbreviation or acronym?
a) <em>
b) <q>
c) <abbr>
d) <blockquote>

  Discussion

Answer: c
Explanation: <em> element indicates emphasis, browser will show the contents of <em> element in italic. We used <q> element for shorter quote. Browser put quote around <q> element. A section which is quoted from another source is specified by <blockquote>. For using, abbreviation or acronym <abbr> element is helpful. A title element is to be used with abbr.

4. What is the work of <address> element?
a) contains contact details for author
b) contains IP address
c) contains home address
d) contains url

  Discussion

Answer: a
Explanation: The contact details for author of a page is specified by <address> attribute. The content is often displayed in italics

5. To show deleted text, which element is used?
a) <ins>
b) <del>
c) <em>
d) <strong>

  Discussion

Answer: b
Explanation: <strong> element shows the importance of text/paragraph between it’s tags. <em> element indicates emphasis, browser will show the contents of <em> element in italic. <ins> element shows the content that has been inserted, usually it has underline. <del> element shows text that has been deleted from, usually it has a line through the content.

6. Which element is used to show inserted element?
a) <ins>
b) <del>
c) <strong>
d) <em>

  Discussion

Answer: a
Explanation: <del> element shows text that has been deleted from, usually it has a line through the content. <strong> element shows the importance of text/paragraph between it’s tags. <em> element indicates emphasis, browser will show the contents of <em> element in italic. <ins> element shows the content that has been inserted, usually it has underline.

7. How <bdo> element works?
a) override text direction
b) stops writing in the current text direction
c) only override direction of rtl text
d) only changes the direction of ltr text

  Discussion

Answer: a
Explanation: For bidirectional override of current text direction, we used <bdo> element, e.g. <bdo dir=”rtl”>Text is right to left</bdo>. This element was already there before HTML5. It is supported by all the browsers.

8. Which property is similar to C/C++ can be applied to comments?
a) for loop
b) while loop
c) ifelse
d) switch case

  Discussion

Answer: c
Explanation: We can add conditional comments in our web page using if and endif, e.g. <!–[if age 9]>..text….<![endif]–>, there is no provision of “for” or “while” loop in HTML, same apply with switch case also.

9. Which element defines a title of the Work?
a) <abbr>
b) <cite>
c) <address>
d) <blockquote>

  Discussion

Answer: b
Explanation: For using, abbreviation or acronym <abbr> element is helpful. The contact details for author of a page is specified by <address> attribute. A section which is quoted from another source is specified by <blockquote>. The tittle of a Work is defined by <cite> elements, usually it displays in italics.

10. For smaller text which element is used?
a) <tiny>
b) <min>
c) <small>
d) <em>

  Discussion

Answer: c
Explanation: min is an attribute for input method for inserting minimum value. smaller text is define by <small>element. <em> is used for emphasis usually it is display in italics.