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:
A complete list of educational resources related to HTML is available on our HTML page.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.