DEV Community

Hemanth_Polisetti
Hemanth_Polisetti

Posted on

HTML TAGS

1.What is HTML Tag?

  • Image result for what is html tag An HTML tag is a piece of markup language used to indicate the beginning and end of an HTML element in an HTML document. 2.What are the types of HTML Tags?
  • These are mainly classified into Two Types:- a)Based on their structure b)Based on their usage

a)Based on their Structure it`s further classified into two types:
i)Opening and Closing Tags
ii)Self-Closing Tags
i) Opening and Closing Tags: These have an opening tag and closing tag.if a tag is opened it should definetely closed.
Example:

<div></div>

ii) Self-Closing Tags: These have only one Tag,It will be closed at the end of the opening tag(No seperate tags are Required).
Example:

<input type="" >

b)Based On Their Usage it`s further classified into two types:
i)Block Level Tags
ii)Inline Level Tags
i)Block Level Tags: The Elements which occupy the whole Available space bound by the tags and these tags start in new line.
Example:

<div></div>

ii)Inline Level Tags: The Elements which only occupy the necessary space bound by the tags and these are doesn`t need to start in a new line.
Example:

<span></span>

3.Some most used HTML Tags:
-> Div tag
-> Heading tags
-> Paragraph tag
-> break tag
-> span tag
-> image tag
-> anchor tag
-> table tag
-> pre(preformatted) tag
-> form tag
-> input tag
-> textarea tag
-> select tag
-> button tag

                      --Thank You--
Enter fullscreen mode Exit fullscreen mode

Top comments (0)