• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar

CodingStatus

- Free Source Code for Web Applications

  • programs
  • JavaScript
  • jQuery
  • ReactJS
  • Ajax
  • Node.js
  • PHP
  • SQL
  • Interview Questions

HTML Tags – What are HTML Tags

December 31, 2022 By Md Nurullah

HTML tags: If you need to display content properly on your web page then you will have to use the Tags.

If you don’t use the tags then Everything will look similar. This means that there will not be a difference between the heading and the paragraph. Even the text format will be the same.

html tags

 

What are HTML Tags

  • The HTML tag is the predefined name of content or documents.
  • HTML tag name is covered with two angle brackets.
  • HTML tags are helpful to display content or document in a proper format.
  • HTML tags tell the web browser how to display content.
  • The Web browser does not display HTML Tags

HTML Tag Syntax

Here is the syntax of HTML tags –

<tagname>

Where –

  • < – Left angle bracket
  • tagname – Predefined name of the Tag
  • > – Right angel bracket

Note –

HTML tags are not case-sensitive. This means that you can write tagname in lowercase, uppercase, or camelcase.

According to the coding standard, You should always write tags in lowercase.

  • <tagname> – Lower Case ( Recommended)
  • <TagName> – Camel Case
  • <TAGNAME> – Upper Case

HTML Tags Example

The predefined name of each HTML tag is taken from the first letter of the document. So, that developer can easily remember.

For Example –

  • The tag name of the head – <head>
  • The tag name of the title – <title>
  • The tag name of Body- <body>
  • The tag name of the first heading – <h1>
  • The tag name of the second heading – <h2>
  • The tag name of the third heading – <h3>
  • The tag name of the fourth heading – <h4>
  • The tag name of the fifth heading – <h5>
  • The tag name of the sixth heading – <h6>
  • The tag name of the paragraph -<p>
  • The tag name of the table – <table>
  • The tag name of an ordered list – <ol>
  • The tag name of the unordered list – <ul>
  • The tag name of the image – <img>

Note – There are many HTML tag names which we will learn in the next tutorials

Basic HTML tags List

Here is the basic HTML tag list that are very useful to create a simple web page.

HTML Tags  Tag Name
<head></head> Head Tag
<title></title> Title Tag
<body></body> Body Tag
<h1></h1> H1 Heading Tag
<p></p> Paragraph tag
<img> Image Tag
<table></table> Table Tag
<ol></ol> Ordered List
<ul></ul> Unordered List

Types of HTML tags

Four Types of Tags are defined in HTML –

  • Open Tag
  • Close Tag
  • paired Tag
  • Unpaired Tag

Now, Let’s go to understand each tag one by one in the separate steps

HTML – Open Tag

Open Tag is defined to start the section of a document.

Open tag contains angle brackets and tag name.

Open tag is also known as a start tag, and beginning tag.

Syntax –

<tagname>

HTML – Close Tag

Close Tag is defined to end the section of a document.

The close tag contains angle brackets, tag name, and a single forward slash (/)

A close tag is also known as an end tag.

Close Tag always comes with an open tag.

Syntax –

</tagname>

HTML – Paired Tag

The combination of the open tag and closing tag is called the paired tag.

Paired tags indicate where the content of a document begins and ends.

<tagname>Some Text </tagname>

Example –

<h2>Second heading text<h2>
<p>Some paragraph text</p>

HTML – Unpaired Tag

An unpaired tag does not have a closing tag. It only comes with the open tag.

Image, Input Field, Line Breaking, Horizontal line etch these all types of content come with the  Unpaired tag.

An unpaired tag closes itself. So, It is also known as Self Closing Tag.

Syntax –

<tagname>

You should add a forward slash (/) at end of the open tag to define self-closing.

<tagname />

Example –

<hr />
<br />
<img src="" />
<input type="text" />

Usage of HTML Tags

To use HTML Tags, We can –

  • display Content/documents in a proper format.
  • create navigation links to go from one page to another page.
  • create a table to display data in a tabular format.
  • create a list to display data in a list format.
  • display images on the webpage
  • create many forms such as Registration Form, Login Form, Contact Form, Feedback Form, Comment Form, etc
  • make Video Player and Audio Player.

Above, we informed you about the use of some important  tags. You can do even more with tags. You’ll learn more about its uses as you progress.

Advantages of HTML Tags

  • It is very simple to learn tags
  • Tags support all types of web browsers.
  • Tags are compatible with other Web Languages (CSS, JavaScript, PHP, & more).
  • text of Tags can be opened in the web browser without connecting to any internet connection

Disadvantages of HTML Tags

  • Tags can’t work as a programming language. because it has no conditions & logic.
  • Tags can’t make dynamic content. Means that It can not display content on the user request.
  • Tags can’t make attractive content or web page without using CSS.
  • The layout and content made of tags may look different in different web browsers.

Related posts:

  1. HTML Introduction – What is HTML
  2. HTML Elements
  3. HTML Heading Tags

Filed Under: HTML

Hey there, Welcome to CodingStatus. My Name is Md Nurullah from Bihar, India. I'm a Software Engineer. I have been working in the Web Technology field for 4 years. Here, I blog about Web Development & Designing. Even I help developers to build the best Web Applications.

Primary Sidebar

Latest Tutorials

  • Login with ajax in PHP, MySQL
  • Load Records on Select Box using Ajax, PHP & MySQL
  • Swapping of Two Numbers in python
  • How to Install Express Application Using Express Generator Tool
  • Registration Form using Ajax, PHP & MySQL

Popular Tutorials

  • HTML Heading Tags
  • HTML Elements
  • HTML Tags – What are HTML Tags
  • HTML Introduction – What is HTML

Categories

  • Ajax (12)
  • Django (5)
  • HTML (4)
  • Installation (3)
  • Interview Questions (5)
  • JavaScript (20)
  • jQuery (11)
  • Laravel (2)
  • Node.js (23)
  • PHP (42)
  • programs (1)
  • Python Programs (1)
  • ReactJS (35)
  • SQL (12)
  • Tips (7)
  • Home
  • About Us
  • Privacy Policy
  • Disclaimer
  • Terms & Conditions
  • Sitemap
  • Contact Us

Copyright © 2023 CodingStatus - All Rights Reserved