What are HTML Tags Enclosed in?

Learn via video course
FREE
View all courses
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
Topics Covered

Build an AI-First Career, Master the Complete Skillset

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program
NSDC Certified

AI Forward Deployed Engineer Program

Full-stack engineering, production AI and client-facing consulting

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program

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.
Sharpen Your Fundamentals with Free Learning

Learn more

How Scaler Transformed Careers in Different Fields

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data
Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more

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.