The <head> element is just a container for all other header elements. It should be the first thing to appear after the opening <html> tag.
Each <head> element should contain a <title> element indicating the title of the document, although it may also contain any combination of the following elements, in any order:
- The <base> tag is used to areate a "base" url for all links on the page. Check HTML Base tag.
- The <object> tag is designed to include images, JavaScript objects, Flash animations, MP3 files, QuickTime movies and other components of a page. Check HTML Object tag.
- The <link> tag is used to link to an external file, such as a style sheet or JavaScript file. Check HTML Link tag.
- The <style> tag is used to include CSS rules inside the document. Check HTML Style tag.
- The <script> tag is used to include JAVAScript or VBScript inside the document. Check HTML Script tag.
- The <meta> tag includes information about the document such as keywords and a description, which are particularly helpful for search applications. Check HTML Meta tag.
Example:
Following is the example of head tag.
Following is the example of head tag.
<head>
<title>HTML Basic tags</title>
<meta name="Keywords" content="HTML, Web Pages" />
<meta name="description" content="HTML Basic Tags" />
<base href="http://learnhtmlandcssonline.blogspot.com/" />
<link rel="stylesheet" type="text/css" href="tp.css" />
<script type="text/javascript"> _uacct = "UA-44808176-1"; urchinTracker(); </script>
</head> The <title> Element:
You should specify a title for every page that you write inside the <title> element. This element is a child of the <head> element). It is used in several ways:
- It displays at the very top of a browser window.
- It is used as the default name for a bookmark in browsers such as IE and Netscape.
- Its is used by search engines that use its content to help index pages.
Therefore it is important to use a title that really describes the content of your site. The <title> element should contain only the text for the title and it may not contain any other elements.
Example:
Here is the example of using title tag.
<head> <title>HTML Basic tags</title> </head>

No comments:
Post a Comment