What is an HTML tag?

The HTML tag element is an essential part of an HTML document. HTML tags can be understood as HTML language used to describe the definition of HTML document.

HTML tags are keywords surrounded by angle brackets, often in pairs, such as <html> </html>, which indicates that this is an HTML document. The first tag in the tag pair is the start tag, and the second tag is the end tag.

There are also a few tags that are not paired or do not have an end tag, such as the newline tag <br />.

HTML tags closing

In the HTML specification, all tags must be closed. For non-paired tag, add with space plus /> to close the tag, such as <br /> .

Commonly used HTML tags

<html> </html> tags

The tag indicates this is a HTML document, all other HTML tags must be embedded within this tag.

     <p>Text paragraphs</p>

<head> </ head> tag

<head> </ head> Identifies the headers of the HTML document, which are typically required by the browser, along with additional instructions for the HTML document, such as CSS styles for loading documents or other scripting information.

<title> </ title> tag

This tag defines the title of the entire HTML document for display in the title bar at the top of the browser window, nested within <head> </ head>.

   <title>HTML Tag - HTML Tutorial</title>

<body> </ body> tag

As the name suggests, the label describes the text of the HTML document, all the text content to be displayed is included in the label.

HTML header

HTML document title is divided into six levels, <h1> - <h6>.

<h1>first level header</h1>
<h1>secondary title</h1>
<h1>level 3 heading</h1>

Note that the non-title <title> title, but usually <h1> in the core equivalent to the <title>. For more information see header tag.

HTML paragraph

The HTML paragraph is defined by the <p> </ p> tag:

<p>This is a paragraph</p>

For more information see <p>.

HTML hyperlink

The HTML hyperlink is defined by the <a> </a> tag:

<a href="">Developer Tutorial</a>

For more information see <a>.

HTML images

HTML images are defined by <img> tags:

<img src = "flower.jpg" alt = "flower" />

In this tag, an image source is provided with the src attribute, which displays a flower.jpg image in the browser. For more information see <img>.

HTML form

HTML form for the collection of user input information, such as user comments, forms through <form> </ form> to define:

   various form elements (text fields, drop-down lists, radio boxes, check boxes, etc.)

For more information see <form>.

Copyright 2014-2017 by All Rights Reserved.