HTML-Head

<head> tag define HTML head.  Head is container and include all elements applicable to HTML page like - title, , style, meta, link, base


HTML Head Syntax

<!DOCTYPE html>
< html>
< head>
< title>HTML Head Page</title>
< /head>
<head> tag define HTML head......
< body>

< /body>

< /html>

 

 

Attributes are provided with start tag of HTML element.

Start tag Element content End tag /Example
<title> Text inside title tag is displayed as title of browser </title>
<base> Using base you can specify the base url in head section of html document.

In body section you only need to specify relative url.
<base href="http://www.htmll.com/myurl/">
<meta> With Meta tags you can specify Meta Description or Meta Keywords for HTML Page, <meta name="description" content="Head section in HTML Page">
<meta name="keywords" content="Head, HTML">
 <meta name="author" content="HTML Author">
<meta charset="UTF-8">
<link> Link tag describe relationship between HTML page with external resource  
<script> Using Script tag you can define client side script e.g. javascript  
<style> With style tag you can define style information </style>

 


Sample Code

 

 

<html>

<head>

<meta name="description" content="Head section in HTML Page">
<meta name="keywords" content="Head, HTML">
 <meta name="author" content="HTML Author">
<meta charset="UTF-8">
<style>
h1 {color:blue;}
p {color:black;}
</style>

<link rel="stylesheet" type="text/css" href="html5theme.css">

<script>
document.write("This will test the script")
</script>
</head>

 

<body>
<h1>Heading in Blue Color</h1>
<p>Pararaph in Black Color</p>
</body>

</html>






Attributes    Blocks    Color-Values    Colornames    Colors    Comments    CSS    Editors-for-writing-html    Elements    Entities    Formatting-in-HTML    Forms    Head    Headings    HTML-Reference    IFrames    Image    Javascript    Layouts    Links    Options for building websites    Paragraphs    pointers and questions    Symbol-for-Mathmatics    Symbol-for-Punctuations    Symbols    Tables    Whats-new-in-HTML5   

Advertisement

Topics