Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEdward Zhou
377 PointsWhat is the purpose of <head> tag?
Hi, I was just wondering what the <head> tag does.
When I was coding, nothing changed after removed the <head> tag, which made me wonder what purpose does this tag really serves.
3 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHi Edward, The head is where all the metadata is place and also where the links or other information the site needs is placed. A good read on it can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head :)
Nikhil Deorkar
Courses Plus Student 1,695 PointsHi Edward, the head tag is actually really important. First, it sets the title of your web page. This may not be super obvious at first but when you look at the tab in your chrome, internet explorer, or other browser, you should see the title you defined in the head tag. It is also where you put meta information. For example, the charset, or character set, is defined in the the head. This sets the specific encoding for a website which is very important. Another example of this is the "responsive meta tag" which is a vital part of any website that is responsive. This has to go in the head tag. As for link tags, those can go in the body in either the beginning or the end but it is usually put in the head tag and it is generally received as a best practice to put it in the head.
ross williamson
Courses Plus Student 595 PointsYour asking this in the wrong section
Eduardo Calvo
Courses Plus Student 1,411 PointsEduardo Calvo
Courses Plus Student 1,411 PointsThank you for the link !