HTML Advanced Text Quiz

Quiz 4 10 questions

Prerequisites for the quiz

  1. HTML Advanced Text

Are you ready?

10 questions to solve

Instructions
  1. This quiz goes to full-screen once you press the Start button.
  2. At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
What is the purpose of the <q> element?
The <q> element is used to denote an inline quotation in HTML. Hence, the correct choice is (C). Learn more in HTML Advanced Text: <q>.
The <blockquote> element can contain a <p> element in it. True or false?
Absolutely true. If a <blockquote> represents a large block of text that can't be stated in one line, we can use multiple <p> elements inside the <blockquote>. Learn more in HTML Advanced Text: <blockquote>.

Consider the following piece of text with certain highlights:

JavaScript is a high-level language. It runs on the client side as well as on the server side (using Node.js).

Which HTML element should we use to represent these highlighted portions?
The <mark> element is used to represent marked/highlighted text in HTML. Hence, the correct choice is (C). Learn more in HTML Advanced Text: <mark>.
What does the cite attribute of a <blockquote> represent?
The cite attribute of a <blockquote> element defines the URL of the source from where the quotation is taken. Learn more in HTML Advanced Text: <blockquote>.

Given the following output of some HTML, if we hover over the text 'PHP' with the pointer, we get the full-form 'PHP: Hypertext Preprocessor' displayed.

PHP is a high-level, server-side scripting language.

Which element best aligns with this task?
The <abbr> element is used to represent abbrevitations in HTML, such as the one shown above. Hence, the correct choice is (A). The <acronym> element was used for the same purpose but has long been deprecated in HTML and so we must not use it anymore. Learn more in HTML Advanced Text: <abbr>.
Alice wrote the following HTML code to define the term 'floor' in mathematics:
<p><dfn>The floor of a number is the largest integer less than or equal to it.</dfn></p>
What is the problem in her code?

Unlike what one might expect, the <dfn> element in HTML is NOT used to mark up an entire definition; it's only used to mark up the main term that's being defined. The code above is problematic since Alice has placed the entire definition inside the <dfn> element.

Here's the correct way to use <dfn>:

<p>The <dfn>floor</dfn> of a number is the largest integer less than or equal to it.</p>

Hence, the correct choice is (C). Learn more in HTML Advanced Text: <dfn>.

The <dfn> element can be nested inside a <dfn> element. True or false?
Clearly false. It doesn't make any sense to be nesting a <dfn> element inside another <dfn>. Learn more in HTML Advanced Text: <dfn>.
What is the purpose of the <pre> element?
The <pre> element is used to represent a preformatted block of text in HTML, i.e. one where any sequence of whitespace characters is preserved (unlike the default behavior in HTML to reduce them down to one single space). Hence, the correct choice is (C). Learn more in HTML Advanced Text: <pre>.

Consider the following output:

Wooden table ($50.00 $150.00)

Which element best aligns with marking up the cut-off '$150.00' here?
The <s> element is used to strike-through text (which is to draw a line through it). The <del> element accomplishes the same task visually albeit it's meant to used in cases where we're dealing with an app that has editing capabilities in it. Since the '$150.00' above is certainly not a deleted piece of text but just cut-off, <s> better aligns with it. Thus, the correct choice is (A). Learn more in HTML Advanced Text: <s>.
Which of the following best describes the purpose of the <cite> element?
The <cite> element is used to define the name/title of an information's source. This goes with choice (B). Learn more in HTML Advanced Text: <cite>.

"I created Codeguage to save you from falling into the same learning conundrums that I fell into."

— Bilal Adnan, Founder of Codeguage