Are you ready?
11 questions to solve
Instructions
- This quiz goes to full-screen once you press the Start button.
- At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
Which of the following denotes a tag in HTML?
A tag in HTML begins with
<
and ends with >
. Hence, out of all the given options, only <body>
denotes a tag. The correct choice, therefore, is (A). For more information, refer to HTML Basics.Which element is used to denote the title of a webpage as it displays in SERPs (Search Engine Results Pages)?
The
<title>
element is used to denote the title of a webpage, which is displayed in the browser's tab panel and even in SERPs when the webpage shows up as a suggestion. For more information, refer to HTML Basics — Document title.What is meant by a container element in HTML?
A container element is one that has two tags: a starting tag and an ending tag. An example is
<html>
. It has a starting tag, <html>
, and an ending tag, </html>
. For more information, refer to HTML Basics — Elements and tags.What is meant by a void element in HTML?
A void element is one that only has a starting tag, and no ending tag. An example is
<img>
(as we shall learn later on in this course). For more information, refer to HTML Basics — Elements and tags.The following two code snippets for a webpage produce different outputs in the browser. True or false?
Snippet 1:
<!DOCTYPE html>
<html>
<body>
<h1>A heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Snippet 2:
<!DOCTYPE html>
<html>
<body>
<h1>A heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Both the code snippets are equivalent to one another, it's just that the second one has the
<h1>
and <p>
elements non-indented. But almost always, indentation doesn't matter in HTML (we'll see edge cases later on in this course when we cover the <pre>
element). So both the code snippets would produce the exact same output. And this goes with choice (B). For more information, refer to HTML Basics.What is an attribute in HTML?
An attribute is simply a characteristic, a trait, an additional aspect, of an HTML element. Hence, the correct choice is (B). For more information, refer to HTML Basics — Attributes.
An attribute consists of two things. What are they?
An attribute consists of a name and a value. This goes with choice (A). For more information, refer to HTML Basics — Attributes.
What is the purpose of the
<a>
element?The
<a>
element is used to create a hyperlink in HTML, which is the crux of HTML being a hypertext system. Likewise, the correct choice is (B). For more information, refer to HTML Basics — The <a>
element.What does the letter 'a' in
<a>
stand for?The 'a' in
<a>
stands for 'anchor'. Hence, the correct choice is (B). For more information, refer to HTML Basics — The <a>
element.How to denote a paragraph in HTML?
The
<p>
element is used to denote a paragraph in HTML. This goes with choice (A). For more information, refer to HTML Basics.Which of the following are recommended best practices to abide by when writing HTML?
Of the choices given, only (A) and (C) are correct. For more information, refer to HTML Basics — Coding style guide.