Computer Science, asked by anish766399, 11 months ago

what is difference between container tag and empty tag explain with example​

Answers

Answered by gurukulamdivya
31

Answer:

Container tag consists of opening tag+content+closing tag . While empty tag is tag without content or a closing tag.

Container tags are used to enclose texts, images etc. Like <body> , <div> etc are container tags as we put some content inside them.

But empty tags are used to insert something. Like if we want to insert an image or a line-break or a horizontal-line , we use <img />, <br />, <hr /> tags respectively.

Empty tags can be used inside the container tags. Like you can insert a line-break or an image anywhere in your page but it should be inside some container tag.

<body>

<p>

Some text here <br /> This inserts a line break.

</p>

<p>

<img src='' '' />

</p>

</body>

I hope its clear now.

Answered by pandayrenu13386
15

Answer:

Container tag- It is used to hold data between opening and closing brackets. For example- <HTML>,<HEAD>,<BODY>etc..

Empty tag- Empty tags have only opening brackets. Example-<br>,<hr>,<link>etc..

Explanation:

HOPE IT HELPS!!

Similar questions