Beginner learning HTML must know that what are the Tags in HTML. As we know, the HTML is a Markup Language, several tags are used to mark-up the texts in the HTML document. Or simply we can say that tags are used to structure the HTML document. Structuring the document means declaring the type of document, adding a head section, giving title to the document, writing heading and paragraphs inside the body of the document, inserting an image in the document, and so on. Here, the document can be referred to as a web page.

Structure of Tags in HTML

Tags in HTML is written as the opening angle bracket, then the tag name inside it, and then the closing angle bracket.

Tags in html

What are the types of Tags in HTML?

HTML tags are classified into two types:

  • Container Tags: Container Tags are those types of Tags that have both opening and closing tags. Some of the examples of Container tags are:
  • <html>.......</html>
  • <head>.......</head>
  • <title>........</title>
  • <body>........<body>
  • <h1>.........</h1>
  • <p>..........</p>
  • Empty Tags: These types of tags have no closing tags. Some of the examples of Empty tags are:
  • <br>
  • <img>
  • <input>
  • <hr>
  • <base>
  • <area>

See also: Basics of HTML Coding

List of Important Tags in HTML

Although there are dozens of tags used in HTML some of them are very important for the learner of HTML to know them. Tags in the HTML are mostly Container tags and few of them are Empty tags. Here is the list of Important HTML tags with there syntax, codes, along with there Output Examples:

Basic HTML Tags

<DOCTYPE HTML>

The <DOCTYPE HTML> tag declares the browser that the document being rendered is an HTML Document. This Tag is not case sensitive.

<html>

The <html>tag is an opening tag by which structuring an HTML document starts.

<head>

The <head>contains the <title>tag, <style>tag, <meta>tags etc.

<title>

The <title> tag is used to write the title of the HTML Document. It is printed on the above tabs of the browsers. It is written inside the <head> tag.

<style>

The <style> tag is used to include the internal CSS rather than referring it from other stylesheets. It is written inside the <head> tag.

<body>

The <body>tag defines the body of the HTML Document. All the visible items of the Web page is written inside the <body>tag. There can be only one <body> tag in an HTML Document.

<h1> to <h6>

The <h1> to <h6> tags are used to write the Headings in the HTML tag. The <h1> represents the most important heading of the document and <h6> represents the least important heading in the document.

<p>

The <p>tag is used to write the Paragraph in the Document.

<!– –>

The <!-- --> tag is used to write comments between the HTML codes. The written between this tag is not rendered as a code by the browser and is not printed in the browser.

Formatting Tags

<abbr>

The <abbr> tag is used to write the acronym or abbreviations of the alphabet written between this tag.

<address>

The <address> tag is used to write information and the address of the author.

<b>

The <b> tag is used to write the bold text.

<blockquote>

The <blockquote> tag is used to write the text as the Quotation from the other Source.

<cite>

The <cite> tag is used to specify the title of any work.

<code>

The <code> tag is used to highlight the programming codes directly in the browser.

<del>

The <del> tag defines that the text has been deleted.

<kbd>

The <kbd> tag is used to print the alphabet in the form of keyboard buttons.

<pre>

The <pre> tag defines the text as the preformatted text. It is interchangeably used with the <code> tag.

<small>

The <small> tag is used to write a smaller text.

<mark>

The <mark> tag is used to highlight the text generally with the yellow color.

<strong>

The <strong> tag is used to define the important text. It is interchangeably used with the <b> tag.

<sup>

The <sup> tag is used to define the superscripted text.

<sub>

The <sub> tag is used to define the subscripted text.

<dfn>

The <dfn> tag is used to write a definitions in the HTML document.

<em>

The <em> tag is used to emphasize any text.

Form and Input Tags

<form>

The <form> tag is used to create an HTML form.

<Input>

The <input> tag is used to control the user input in the HTML form. It is usually placed inside the <form> tags.

<textarea>

The <textarea> tag is used to create a large user input box. For example, comment box.

<button>

The <button> tag is used to create the clickable button.

<select>

The <select> tag is used to create the selectable dropdown list.

<optgroup>

The <optgroup> tag is used to create a group of the related list in the dropdown list.

<label>

The <level> tag is used to level a <input>element.

<fieldset>

The <fieldset> is used to put all the form element inside a group.

<legend>

The <legend> tag is used to provide a caption to the <fieldset> element.

 

 

 

 

 

 

Avatar

By Rahulwebdev

Hello! I am Rahul Raj. A tech blogger and an enthusiastic web developer. Sharing my skills through my blog. Keen to learn various Programming Languages. " Programming is Poetry".