Which of the following is NOT a pair tag in HTML?
<img>
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).
/ before the tag name. Examples include <p>...</p>, <div>...</div>, ..., and <title>...</title>.<br> (line break), <hr> (horizontal rule), and <img> (image).Let's examine each tag provided in the options to determine if it is a pair tag or not a pair tag:
<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.<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.<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.<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.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>.
| 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> |
Understanding common HTML tags is crucial for web development. Here are a few examples of both types:
<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.<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.In HTML, month attribute defines a control with ______
Which of the following tag creates a checkbox for a form in HTML?
In a HTML form, which of the following input control is used for allowing users to make multiple selections?
What is the full form of SGML?
_______ specifies the HTML Element that you want to style.