Next in our list comes the 'head' element which is the child of the 'html' element.
The head element is a container for all the information about the document. Elements inside <head></head> can include scripts, instruct the browser where to find style sheets, provide meta information, and much more.
The following tags can be added to the head section which will be discussed in detail later:
1.<title>
2.<base>
3.<link>
4.<meta>...
5.<script>
6.<style>.
etc.
Now as we can see the title element is actually a part of head element. The head element is also similar to the html element pertaining to an opening and closing tag like <head></head>. Therefore, the previous code can be modified as:
Test code:(Use this code to see if title bar displays the title)
<html>
<head>
<title>
My page still has a title within head tag
</title>
</head>
<html>
Note: Always save the <html> element containing file with the extension .html or .htm for it to work. For images please refer to the previous post Webpage has a title.
The head element is a container for all the information about the document. Elements inside <head></head> can include scripts, instruct the browser where to find style sheets, provide meta information, and much more.
The following tags can be added to the head section which will be discussed in detail later:
1.<title>
2.<base>
3.<link>
4.<meta>...
5.<script>
6.<style>.
etc.
Now as we can see the title element is actually a part of head element. The head element is also similar to the html element pertaining to an opening and closing tag like <head></head>. Therefore, the previous code can be modified as:
Test code:(Use this code to see if title bar displays the title)
<html>
<head>
<title>
My page still has a title within head tag
</title>
</head>
<html>
Note: Always save the <html> element containing file with the extension .html or .htm for it to work. For images please refer to the previous post Webpage has a title.
Comments
Post a Comment