Use of html head tag
The <head> tag is the container for all inside the head elements. Inside the <head> element we can include the title of the webpage, script language declaration and definition, internal style sheet declare here, most important meta tag also include inside this head tag.
The tag can contain the following tags <style>,<title>,<link>,<meta>,<script>,<link>,<noscript> and <base>. All these tag also having the end tag.
<title> Element:-
The <title> tag is defines the title of the webpage or document title. This element is required in all HTML/XHTML files.
Usage of Title tag:-
a) It is show on the browser title bar
b) when the page is display in the search engine, their the heading display this title tag defined text.
c) If we save a page into favorites or bookmark, their also use this title defined text.
Base tag:-
<base> tag is used to specify the target/URL for all relative URLs in that page
link element :-
The link element is used to current webpage or document to external resources, mostly import css files.
style element :-
The style tag is used to define the style of that page, this is called internal style sheet, this styles are write inside of the <style> and </style> tag. Every styles are defined using class name or id of the particular html element.
<html>
<head>
<style>
.samplestyle
{background:white;}
</style>
</head>
<body class="samplestyle">
body of the page
</body>
</html>Usage of meta element:-
Meta tag is used to explain the information about the webpage data. The meta tag will not display in any webpage but the search engine are read the details of the webpage data using the meta tag. so this is the important to improve your website SEO rating.
<html>
<head>
<meta name="keywords" content="learn, teach, buy, sell">
<meta name="description" content="learn from teachers and teach to students and buy and sell">
</head>
<body>
body of the page
</body>
</html>
Advertisement
The tag can contain the following tags <style>,<title>,<link>,<meta>,<script>,<link>,<noscript> and <base>. All these tag also having the end tag.
<title> Element:-
The <title> tag is defines the title of the webpage or document title. This element is required in all HTML/XHTML files.
Usage of Title tag:-
a) It is show on the browser title bar
b) when the page is display in the search engine, their the heading display this title tag defined text.
c) If we save a page into favorites or bookmark, their also use this title defined text.
<html>
<head>
<title> Title of the page</title>
</head>
<body>
body of the content .......
</body>
</html>
<head>
<title> Title of the page</title>
</head>
<body>
body of the content .......
</body>
</html>
Base tag:-
<base> tag is used to specify the target/URL for all relative URLs in that page
<html>
<head>
<base href="http://www.allinworld99.blogpsot.com/images" target="_blank">
</head>
<body>
<img src="sample.jpg" />
<!--Actual path is set by http://www.allinworld99.blogpsot.com/images/sample.jpg-->
Body of the content.....
</body>
</html>
<head>
<base href="http://www.allinworld99.blogpsot.com/images" target="_blank">
</head>
<body>
<img src="sample.jpg" />
<!--Actual path is set by http://www.allinworld99.blogpsot.com/images/sample.jpg-->
Body of the content.....
</body>
</html>
link element :-
The link element is used to current webpage or document to external resources, mostly import css files.
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<body>
body of the page
</body>
</html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
body of the page
</body>
</html>
style element :-
The style tag is used to define the style of that page, this is called internal style sheet, this styles are write inside of the <style> and </style> tag. Every styles are defined using class name or id of the particular html element.
<html>
<head>
<style>
.samplestyle
{background:white;}
</style>
</head>
<body class="samplestyle">
body of the page
</body>
</html>
Meta tag is used to explain the information about the webpage data. The meta tag will not display in any webpage but the search engine are read the details of the webpage data using the meta tag. so this is the important to improve your website SEO rating.
<html>
<head>
<meta name="keywords" content="learn, teach, buy, sell">
<meta name="description" content="learn from teachers and teach to students and buy and sell">
</head>
<body>
body of the page
</body>
</html>
Advertisement
Post a Comment for "Use of html head tag"