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.
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:
- Empty Tags: These types of tags have no closing tags. Some of the examples of Empty tags are:
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> tag declares the browser that the document being rendered is an HTML Document. This Tag is not case sensitive.
<html>tag is an opening tag by which structuring an HTML document starts.
<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
<style> tag is used to include the internal CSS rather than referring it from other stylesheets. It is written inside 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>
<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>tag is used to write the Paragraph in the Document.
<!-- --> 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.
<abbr> tag is used to write the acronym or abbreviations of the alphabet written between this tag.
<address> tag is used to write information and the address of the author.
<b> tag is used to write the bold text.
<blockquote> tag is used to write the text as the Quotation from the other Source.
<cite> tag is used to specify the title of any work.
<code> tag is used to highlight the programming codes directly in the browser.
<del> tag defines that the text has been deleted.
<kbd> tag is used to print the alphabet in the form of keyboard buttons.
<pre> tag defines the text as the preformatted text. It is interchangeably used with the
<small> tag is used to write a smaller text.
<mark> tag is used to highlight the text generally with the yellow color.
<strong> tag is used to define the important text. It is interchangeably used with the
<sup> tag is used to define the superscripted text.
<sub> tag is used to define the subscripted text.
<dfn> tag is used to write a definitions in the HTML document.
<em> tag is used to emphasize any text.
Form and Input Tags
<form> tag is used to create an HTML form.
<input> tag is used to control the user input in the HTML form. It is usually placed inside the
<textarea> tag is used to create a large user input box. For example, comment box.
<button> tag is used to create the clickable button.
<select> tag is used to create the selectable dropdown list.
<optgroup> tag is used to create a group of the related list in the dropdown list.
<level> tag is used to level a
<fieldset> is used to put all the form element inside a group.
<legend> tag is used to provide a caption to the