What is an HTML Tag?
An HTML tag is a piece of markup language used to indicate the beginning and end of an HTML element in an HTML document.
As part of an HTML element, HTML tags help web browsers convert HTML documents into web pages. For example, the
<p> tag is used to organize text content into paragraph elements and the
<img> tag is used to embed image elements.
Many tags, though not all, use an opening tag and closing tag to wrap around the content that they are used to modify. Closing tags are denoted with a backslash like this:
</tag_name>. HTML tags are not visible in the browser.
The following diagram illustrates how tags are commonly used in HTML elements:
For more educational resources related to HTML elements, please visit:
- How To View the Source Code of an HTML Document
- How To Use and Understand HTML Elements
- How To Build a Website With HTML Tutorial Series
- How To Build a Website With HTML: A DigitalOcean Workshop Kit
- How To Build a Website With HTML ebook
A complete list of educational resources related to HTML is available on our HTML page.