HTML Tags

HTML tags are the basis of HTML coding.

A tag is a way to define sections of code.

This will help you to manually set the styling of those sections as well as to assign properties.

For example, you may want to define a heading title and choose fonts and colors for it, so tags will define the heading in this particular way.

Tags are simple to use, you can find tags surrounded by angled brackets < and >.

For instance, if you want to define the body of the main web page you simply type .

Tags are usually used in pairs – one to start the defined section and others to end it.

Both the angled brackets look familiar but the closing tag has a forward slash.

There are a few HTML tags that do not surround any content which do not have separate opening and closing tags.

Instead, they will have only one tag which is used for both opening and closing.

To illustrate this concept, to insert a line break in between text on your web page, you use the
tag.

The “br” is the tag name here and the tag is considered opened and closed with just this simple syntax.

Tags used to be written in upper or lowercase letters and even both, but HTML standards now specify that all tags must be written in lower case.

There are many different tags.

A user can also assign attributes to some HTML tags.

For instance, if I want to add a picture on my web page, I type and also insert the “src=” attribute to instruct the browser which image to select for loading.