The head and the title tags in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The head and the title tags in html

The title tag still runs properly without being placed between head tag Is it really necessary to place it between head? What's the difference between writing in inside and outside the head tag?

6th Mar 2021, 9:06 AM
Mahdi Jafari
Mahdi Jafari - avatar
4 Answers
0
Modern browser can reconize title tag element almost everywhere. It's useful put into head for Seo and spider bot. Why do you need to put title outside head? Question is pure curiosity?
6th Mar 2021, 9:14 AM
Marco Ginato
Marco Ginato - avatar
+ 2
I think you should do title tag in head just to keep it organised. Who needs it in the body? It isn't even displayed in the body. I also think that not every browser recognises that tag everywhere. I would recommend you to keep the title in head.
6th Mar 2021, 9:28 AM
Alpha-Craft
Alpha-Craft - avatar
0
Ok thank you all
6th Mar 2021, 9:33 AM
Mahdi Jafari
Mahdi Jafari - avatar
0
<title> has a specific purpose, and must be placed inside head to be considered as valid, even if browsers are expected to correct your code if it's not (but seo and spider bots could not find them and/or decrease your page ranking ^^)
6th Mar 2021, 1:15 PM
visph
visph - avatar