00:00Let's put something into the head itself just to showcase
00:02how is the head used.
00:05so one tag that you can only put in the head itself
00:07is called 'title' tag
00:09Now, for title tag, you open and close tag.
00:12Every single tag you create in HTML,
00:14you have to open it, you have to close it.
00:16If you don't close it, you're creating invalid HTML
00:19creating invalid html means that some browsers will not render it correctly
00:23It means that google and other search engines
00:27when they see your page and they see you created a shitty page
00:30or, excuse my French, slappy page or spaghetti page,
00:34or page that wasn't built up correctly,
00:37google is going to say: oh this is a crappy page anyways, let me skip it.
00:41-If you have a bad score on your page, no one is going to see it anyways
00:44-got ya!
00:45So it's really important, you open a tag - you close a tag.
00:47and we are going to learn later on, after we build a little bit more
00:50how do we find bugs in our page, and how do we fix them
00:53but that is way to early for that, right now
00:55In our title itself... and what is the title ?
00:57The title is what you see on the header,
01:00right now we get a default of the name of the file
01:02but that's not very intuitive.
01:05The reason why we need a header...
01:07If a user wants to bookmark the page,
01:09and they go into their bookmarks, well you don't need to see my bookmarks
01:14but in your bookmarks, if you have a title to your bookmarks
01:18then you could see what was the page title.
01:21-yeah, you could find it, yeah.
01:22-exactly, if it's just a file name then it's not that useful.
01:26If you have few tabs opened up at the same time
01:28it would be useful to be able to know what's inside of the page
01:38also, if I go into google and search for my favorite search term which is 02geek
01:42you will see that 02geek pops up
01:45and you'll see also some information like
01:48lifetime membership - and some information
01:50indispensable action scripts - some information
01:52These titles are created from the titles that we put into our HTML page
01:57for example: 02Geek training on twitter,
01:59that's also us
02:00and this title is generated by twitter.
02:04So the user doesn't have to go into the page to know what is going on
02:09By the way, the title 02geek is horrible
02:12it seems like it's just 02geek
02:13we should put a little bit more 'meat' into that tile
02:16we'll take care of that, maybe when you do your search.
02:19What we want to do next is we want to put in a title
02:22a good title for hello world and a good title for that
02:24would be maybe '02geek Hello World'
02:37'HTML Hello World' would be probably the best
02:42We're going to save that
02:43Once we saved that, let me go into our browser and we click on 'refresh'
02:46you'll see that 02geek HTML Hello World has been updated in the title
02:50And we can see it also in the tab itself: 02GEEK HTML Hello World'
02:53so now, even if we are in another page
02:55we can very clearly see what's inside of that page.
02:59Just to tip in general, When you figure out what title you want to use
03:03you really want to put there a title,
03:04it's not too long, that is informational
03:06and easy to people to know what's gonna be inside of it
03:08before you go in it, also to make it convenient for them
03:11to bookmark, but also to make it more usable
03:14when people search for it in google
03:15Because if they don't see something that's relevant for them
03:17they're not gonna click on it - which makes sense