+ 2

If u don't include title tag the text which u write under head is seen as part of the body tag... How and why??

basically whatever is written under head tag is not visible in browser it is just for our reference... but when u write something in head tag without the title tag the text in head is seen as a part of body tag though u have not written it in body tag... and it is visible in browser... so please clarify https://code.sololearn.com/W1S2uZKQP04K/?ref=app

19th Aug 2017, 8:30 PM
Srinidhi Nayak
Srinidhi Nayak - avatar
7 odpowiedzi
+ 3
Hahaha @Srinidhi, yeah it's funny, all this time I always thought things in <head> pairs tag shouldn't be shown in browser, you just proved me wrong. Good analysis though, shame I don't have the answer. Cheers!
20th Aug 2017, 3:52 AM
Ipang
+ 2
May I see your code? it's a bit hard to imagine what you mean here. Thanks.
19th Aug 2017, 8:41 PM
Ipang
+ 2
@srinidhi yes, if you want to give your page a title you must include a title tag.
20th Aug 2017, 4:43 AM
Anshul Shrivastava
Anshul Shrivastava - avatar
+ 1
Everything written on html page without any tag is considered inside of body tag , even if it is written outside a html tag. funFact :- you don't even have to write body tag or html tag. things will work perfectly.
19th Aug 2017, 9:04 PM
Anshul Shrivastava
Anshul Shrivastava - avatar
+ 1
@Anshul Shrivastava thank u☺ but I still have one more doubt... that is I have included tag head within that I have written... so still when u run it is part of body... so is title tag must???
20th Aug 2017, 3:21 AM
Srinidhi Nayak
Srinidhi Nayak - avatar
+ 1
thanku☺
20th Aug 2017, 1:14 PM
Srinidhi Nayak
Srinidhi Nayak - avatar
0
ipang I have inserted the code...☺
20th Aug 2017, 3:18 AM
Srinidhi Nayak
Srinidhi Nayak - avatar