|
|
Head Element & Title
Head & Title
You don't have to include any header information in your webpages, but at the top of every HTML page, after the
<html> tag we would recommend including the <head> element. This element can contain a lot for information for the browser and other visitors (such as search engines) to interpret, and is often used to load JavaScript and CSS, provide "meta" information and add a title to your page. We'll look at some of the more advanced things which can go into the <head> element later on. Try the following code:<html> <head> <title> This is the title of the webpage! </title> </head> <body> </body> </html>
When you load this page into a browser, you should see that the title (the window name in the titlebar of the browser window) has changed to "This is the title of the webpage". You can use the
<title> element to set the title of the window to anything you like, and this will be the default when people bookmark your page or find you through a search engine, so make sure it is accurate!Page Responses
Currently there have been no responses to this page...
If you have anything to contribute to this tutorial, found a bug, or know a better way of achieving the same goal, please leave your response below.
|