Suggest an editImprove this articleRefine the answer for “What is an HTML tag?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)An **HTML tag** is an element of the HTML language that tells the browser exactly what to display on a web page and what role that element plays. **Key point:** HTML tags are the "labels" a page is made of; the browser reads them and understands where the text is, where the image is, where the button is, and where the link is.Shown above the full answer for quick recall.Answer (EN)ImageAn **HTML tag** is an element of the HTML language that tells the browser **exactly what to display on a web page and what role that element plays**. A tag indicates where a certain type of content begins and ends: for example, a paragraph, a heading, an image, or a link. --- ### The structure of a tag Most tags consist of an **opening and a closing element**: ```html <p>This is a paragraph of text.</p> ``` - `<p>` is the **opening tag**, marking the start of the paragraph. - `</p>` is the **closing tag**, marking the end. - Between them is the **content of the element**. --- ### Single tags Some tags **do not require closing** because they contain no text inside: ```html <img src="photo.jpg" alt="Photo"> <br> <hr> ``` Such tags are called **self-closing**: they perform an action (insert a picture, a line break, a line), but do not wrap content. --- ### Tag attributes Tags can have **attributes** that specify their behavior or appearance. Attributes are written inside the opening tag in the format `name="value"`. Example: ```html <a href="https://example.com" target="_blank">Go</a> ``` - `href` is the link, - `target="_blank"` opens it in a new tab. --- ### Examples of tags and their purposes | Tag | Purpose | |---|---| | `<h1>`-`<h6>` | Headings of different levels | | `<p>` | A paragraph of text | | `<a>` | A link | | `<img>` | An image | | `<div>` | A container for blocks | | `<span>` | An inline container for text | | `<ul>` / `<li>` | Lists | | `<table>` | A table | --- ### Summary: | Concept | Meaning | |---|---| | **Tag** | A command for the browser describing the type of an element | | **Paired tag** | Has an opening and a closing form | | **Single tag** | Does not require closing | | **Attribute** | An additional property of a tag | --- **In simple terms:** HTML tags are the **"labels"** a page is made of. The browser reads them and understands: where the text is, where the image is, where the button is, and where the link is.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.