All Exams Test series for 1 year @ ₹349 only
Question

Which of the following is NOT a pair tag in HTML?

The correct answer is

<img>

Understanding HTML Pair Tags vs. Non-Pair Tags

In HTML, tags are used to structure and define content. Tags can be broadly categorized into two types: pair tags (also known as container tags) and non-pair tags (also known as empty tags or self-closing tags).

  • Pair Tags: These tags require both an opening tag and a closing tag. The content they affect is placed between the opening and closing tags. The closing tag has a forward slash / before the tag name. Examples include <p>...</p>, <div>...</div>, ..., and <title>...</title>.
  • Non-Pair Tags: These tags do not require a closing tag. They typically represent a self-contained element or insert something into the document. Examples include <br> (line break), <hr> (horizontal rule), and <img> (image).

Analyzing the Given HTML Tags

Let's examine each tag provided in the options to determine if it is a pair tag or not a pair tag:

  1. <img>: This tag is used to embed an image in an HTML page. It is an empty element, meaning it does not have a closing tag like </img> in standard HTML5. Therefore, it is a non-pair tag.
  2. <p>: This tag defines a paragraph. It requires both an opening <p> tag and a closing </p> tag to enclose the paragraph text. Thus, it is a pair tag.
  3. <i>: This tag is used to render text in italics. It requires both an opening <i> tag and a closing </i> tag around the text that needs to be italicized. Thus, it is a pair tag.
  4. <title>: This tag defines the title of the HTML document, which appears in the browser's title bar or tab. It requires both an opening <title> tag and a closing </title> tag around the title text. Thus, it is a pair tag.

Identifying the Non-Pair Tag

Based on the analysis:

  • <img> is a non-pair tag.
  • <p> is a pair tag.
  • <i> is a pair tag.
  • <title> is a pair tag.

The question asks which of the following is NOT a pair tag. The <img> tag is the one that fits this description.

HTML Tag Type Requires Closing Tag?
<img> Non-Pair Tag (Empty Tag) No
<p> Pair Tag (Container Tag) Yes
<i> Pair Tag (Container Tag) Yes
<title> Pair Tag (Container Tag) Yes

Therefore, the tag that is NOT a pair tag among the given options is <img>.

Revision Table: Key HTML Tag Types

Term Description Example
Pair Tag Requires both opening and closing tags. Encloses content. <p>Content</p>
Non-Pair Tag Does not require a closing tag. Self-contained or inserts something. <img src="image.jpg">
Container Tag Another name for Pair Tag. <div>Content</div>
Empty Tag Another name for Non-Pair Tag. <br>

Additional Information: Common HTML Tags

Understanding common HTML tags is crucial for web development. Here are a few examples of both types:

  • Common Pair Tags:
    • <html>: Root element of an HTML page.
    • <head>: Contains meta-information about the HTML document.
    • <body>: Contains the visible page content.
    • <h1> to <h6>: Headings.
    • <a>: Hyperlink.
    • <ul>, <ol>, <li>: Unordered lists, Ordered lists, List items.
    • <table>, <tr>, <td>: Table elements.
  • Common Non-Pair Tags:
    • <meta>: Metadata about the HTML document.
    • <link>: Defines the relationship between a document and an external resource (e.g., stylesheet).
    • <input>: Input field.
    • <hr>: Horizontal rule.
Was this answer helpful?

Important Questions from HTML

  1. In HTML, month attribute defines a control with ______

  2. Which of the following tag creates a checkbox for a form in HTML?

  3. In a HTML form, which of the following input control is used for allowing users to make multiple selections?

  4. What is the full form of SGML?

  5. _______ specifies the HTML Element that you want to style.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App