why some of the tags has no closing tag?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

why some of the tags has no closing tag??

9th Jul 2016, 4:27 AM
Subramaniam R
Subramaniam R - avatar
4 Answers
+ 1
The content or code is used in between start and closed tags. For example paragraph content is displayed in between paragraph tags as <p> content </p> If there is no content or the tag is for specific usage then we use only single tag. For example Break tag <br>, form tags like input button, etc.. We can use single tags like <br> or <br />
9th Jul 2016, 11:57 AM
Prasanna Kumar Pentakota
Prasanna Kumar Pentakota - avatar
+ 1
inline tag elements like IMG ,BR wont have closing tags
9th Jul 2016, 12:03 PM
Pal D
Pal D - avatar
+ 1
that elements which have no attribute inside it .thats known as empty tag nd thats why they have not ending tag , they cann't hold the text as well as other elements ..like hr tag
11th Jul 2016, 1:29 PM
Kshama Sachan
Kshama Sachan - avatar
0
Kshama Sachan , what about form tags they have attributes right?? Even they hold the text as values??
6th Mar 2020, 1:23 PM
Prasanna Kumar Pentakota
Prasanna Kumar Pentakota - avatar