Understanding tags in HTML with Examples  - 1


What are tags actually? What do they in HTML? In this article, we are going to discuss about tags and also their uses. Tags act like containers. They tell you something about the information that lies between their opening and closing tags. There are tags for headings, paragraph, footer, image, hyperlinks, etc. For example, for paragraph, we have, opening tag and closing tag. Let’s understand some of them in this article and the rest in further upcoming articles.




Heading tags


There are basically six heading tags for different headings. These are h1, h2, h3, h4, h5 and h6. The h1 tag is for main heading, the h2 tag is for subheading and If there are further sections under the subheadings then the element is used, and so on...

For example, see the following code:


Heading

OUTPUT will be like shown below:


Heading


Paragraph tag


To create a paragraph, enclose the paragraph with an opening tag and closing tag
. The browser will automatically detect it and show the paragraph with some spaces and for line break you could use
tag.
For Example, see the following code:




Paragraph




Output will be like shown below:



Paragraph


Bold and Italic tags


BOLD

By enclosing words in the tags and we can make characters appear bold.
The element also represents a section of text that would be presented in a visually different way (for example key words in a paragraph) although the use of the element does not imply any additional meaning.

For example, see the code:




Output:





ITALIC

By enclosing words in the tags and we can make characters appear italic. The element also represents a section of text that would be said in a different way from surrounding content — such as technical terms, names of ships, foreign words, thoughts, or other terms that would usually be italicized.

For Example:







Output:




In this way you can use the above used tags in order to do specific tasks in HTML, I hope this article was useful to you.


Please comment below and let me know what you think and share your thoughts. You can frankly ask any question if you have .