Which Character Is Used To Represent The Closing of a Tag in HTML?

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

In HTML5 it is not strictly necessary to close some HTML tags.

**Note: **The '/' (forward slash) is used to represent the closing of a tag in HTML.

For example - <img>, <link>, <meta>, etc. These tags do not require closing tags. Such tags that aren't required to have a closing tag are called the self-closing tag.

However, there are numerous tags that require a closing tag i.e. you must include a forward slash at the beginning.

For example, tags like <p>, <li>, <head>, <body>, <tr>, <td>, etc. require a closing tag that can be achieved by adding a forward slash at the beginning. Below given is an example of a closing tag in HTML.

Let's see how you can use the forward slash to close the HTML tag:

As shown above, to close the HTML tag, just place a forward slash at the beginning.

Transform Your Career

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

Example of Closing Tag in HTML

As shown in the above example, the p tag is closed by using a forward slash at the beginning of the tag. To consider some text as a paragraph you would open the paragraph tag using the <p> tag and close it with the closing paragraph tag i.e. </p>.

You can also refer to the below image to understand which character is used to represent the closing tag in HTML.

Example of a closing tag in HTML

To learn more about HTML refer here.

Conclusion

  • You know that some tags in HTML require a closing tag and some don't.
  • The forward-slash i.e. / is used to represent the closing of a tag in HTML.
  • There are also some tags that do not require the closing of a tag in HTML and they are called self-closing tags. To learn more about HTML refer here.