What are HTML Tags Enclosed in?

What are HTML Tags Enclosed in?
HTML tags are enclosed in angular brackets < ... >, i.e., the HTML tags are between the left angular bracket and the right angular bracket.
Syntax
For example,
In the above example, the paragraph tag, i.e., the p tag, is enclosed in < >.
Key Points about HTML Tags
-
HTML tags provide web browsers with many instructions like where to place the text, where to display the images, and how the document is structured.
-
As you know, web pages are just plain text. The source code of the web pages can be updated or edited using the text editor.
-
All the HTML files must have one or more essential tags so the browser can differentiate between the HTML text and the normal text.
-
HTML tags are enclosed in < >, i.e., angular brackets.
-
Every tag in HTML performs different tasks.
-
It is considered best practice if the tags in HTML are written in lowercase. However, the HTML tags are not case-sensitive.
-
The beginning tag consists of the tag name, optionally followed by some HTML attributes, whereas the ending tag consists of the name preceded by a forward slash ("/"). Observe that the closing tag has the same name as the opening tag but has an additional forward slash ("/") character.
-
The browsers ignore any white space in the document, i.e., you'll only see a single space on the browser even if multiple spaces are provided in the HTML document.
-
HTML tags comprise elements and attributes. For example, an element is an object on the webpage (for example, heading, image, paragraph, etc.), whereas an attribute is the quality of that element (for example, color, height, etc.).
-
Mostly, tags in HTML come in pairs. Such tags in HTML are called paired tags. An opening tag begins a section of the page content, whereas the closing tag ends it. For example, for the level one heading tag, if you want to include a heading on the web page, you would do this by including an opening tag, i.e., <h1> and the closing of the heading tag is achieved by using </h1>.
-
There are also some tags in HTML which do not come in pairs. That means the HTML tag has an opening tag and a closing tag in a single tag, called unpaired tags. For example, <br>, <hr>, etc., are unpaired tags. Here <br> stands for break line. It breaks the line of code, and <hr> stands for a horizontal rule.
-
Some of the tags in the HTML are non-container tags because they do not contain any content. For example, <br /> is a non-container tag.
-
Remember that you can nest the HTML tags, i.e., one tag can be placed inside the other tag.
-
For example,
- HTML tags should be nested in the correct order, i.e., they must be closed in the inverse order in which they are opened, which means that the first tag opened must be closed at last.
Learn more
- To learn more about the HTML tags and how to use the HTML tags while creating web pages, refer to HTML Tag - Scaler Topics.
- To know what are the available tags in the HTML, you can refer to Lists of HTML tags - Scaler Topics
Conclusion
- HTML tags are enclosed in the angular brackets i.e. < >.
- All the tags in the HTML must be in lower case.
- Tags in HTML provide instructions to the web browsers, such as where to place the images on the web page and where to place the text on the webpage.
- HTML tags come with pairs. With an opening tag in HTML, there should be a closing tag too.
- The opening tag and the closing tag have the same name, but there is an optional character in the closing tag, i.e., forward-slash ("/").
- Some tags in HTML do not require a closing tag, and they are called unpaired tags. For example, <br>, <hr>, etc.
- Some tags in HTML are non-container tags as they do not contain any content.