Where is to put the title tag in the html document? Valid document? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Where is to put the title tag in the html document? Valid document?

Definition of the title tag: The HTML <title> tag is used for declaring the title, or name, of the HTML document. The title tag is placed between the opening and closing <head> tags. In w3schools.com, w3.org or in the sololearn html tutorial the title tag is in the head section. I always put the title tag in the head section and for me is this valid and correct. Is the document valid if the title tag is not in the head section? What is the definition of a valid HTML code? I always lose that point in the challenge ... šŸ¤£šŸ˜‚

26th Jan 2019, 7:48 PM
asa22
4 Answers
+ 4
asa22 , Your understanding is correct. I have reported the challenge question at least twice already.
27th Jan 2019, 8:24 AM
Janningā­
Janningā­ - avatar
+ 1
Most HTML tags still work if you put them in the wrong spot, thanks to ingenious modern browsers. It is considered invalid HTML, but it doesn't matter if you are just temporarily testing something. However, old browsers may get confused by tags in the wrong spot and it won't work. Therefore, in professional code, you should always put tags in the correct places.
26th Jan 2019, 8:12 PM
James
James - avatar
+ 1
Janningā­ PerfektšŸ‘ I have reported this challenge question yesterday.
27th Jan 2019, 9:02 AM
asa22
+ 1
Yay! Team effort. šŸ˜
27th Jan 2019, 9:03 AM
Janningā­
Janningā­ - avatar