Basic Qn | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Basic Qn

Why are some functions like <XYZ>...</XYZ> and some <XYZ ... /XYZ> ?

25th Apr 2020, 3:30 AM
Ming Liang
1 Answer
+ 2
<xyz> these are called tags and not the function Some tags in html don't require ending because if u write <html> then u need to end it as the the page can't just start it has to end somewhere Eg : if u write body tag the u have to end the body tag as well because the content which u will be showing have to end somewhere ,so u close the head tag , But there are empty elements too Like <br> which means u want a line break with that u r just adding a line break u don't need to add a end tag
25th Apr 2020, 4:14 AM
Shubham Pandey
Shubham Pandey - avatar