Jump to content

<head> confusion in W3Schools Tutorials


davej

Recommended Posts

One reason I think they omitted it was because beginners to html tend to think <head> tag is for the top of the page. They use it just like <body> except they think what they put in there will be visible at the top of the page (Like a banner). Obviously this isn't true, so to avoid this confusion they just leave it out, since HTML can work perfectly fine without it. I'm not just saying beginners MIGHT get confused, I have to help beginners to HTML learn at my school and a majority of them thought the head was for the top of the page.

Link to comment
Share on other sites

Ok, but now I see people who have various items such as titles, styles, and metatags floating above <body> with no <head>. I don't see any practicality in recommending anything other than...

<!DOCTYPE html><html><head><title>MyTitle</title></head><body>Hello World</body></html>

Link to comment
Share on other sites

I can see valid reasons for both sides of the story. However, I think I have to lean more towards including the <head> right from the start. They don't have to go into detail about what it's for, just simply that it's required and that it can't have content tags in it. Then, in the advanced section they can explain the true purpose and the various tags it can contain.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...