Suggest an editImprove this articleRefine the answer for “What parts make up 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** consists of three main parts: the tag name, attributes, and content (if the tag is paired). **Key point:** an HTML tag is like a container with a label (name), settings (attributes), and content.Shown above the full answer for quick recall.Answer (EN)ImageAn HTML tag consists of **three main parts**: the tag name, attributes, and content (if the tag is paired). --- ### 1. **The tag name** This is a keyword enclosed in angle brackets `< >` that defines **which element to create**. Examples: ```html <p> - a paragraph <h1> - a heading <a> - a link <img> - an image ``` The tag name tells the browser how to interpret the content: as text, a link, an image, and so on. --- ### 2. **Attributes (optional)** Attributes specify the **behavior or appearance** of an element. They are written **inside the opening tag** and consist of a pair: `name="value"` Example: ```html <a href="https://example.com" target="_blank">Link</a> ``` Here: - `href` is the link address, - `target="_blank"` opens it in a new tab. Attributes give a tag "settings", like function parameters in programming. --- ### 3. **Content** This is what is **located between the opening and closing tag**: text, other tags, or elements. Example: ```html <p>This is the paragraph's content.</p> ``` - `<p>` is the opening tag, - `</p>` is the closing tag, - `This is the paragraph's content.` is the content. --- ### The structure of a paired tag: ```javascript <name attribute="value">content</name> ``` Example: ```html <a href="https://example.com">Go</a> ``` --- ### The structure of a single (self-closing) tag: ```javascript <name attribute="value"> ``` Example: ```html <img src="photo.jpg" alt="Photo"> ``` Single tags **contain no text** and **do not require closing**. --- ### Summary: | Part | Purpose | |---|---| | **Tag name** | Defines the type of the element | | **Attributes** | Specify behavior or properties | | **Content** | What is shown to the user (if the tag is paired) | --- **In simple terms:** An HTML tag is like a container with a label (name), settings (attributes), and content. The browser reads these parts to understand *exactly what to show and how it should work*.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.