HEAD Tag

HEAD Tag


HEAD tag comes after the HTML start tag. It is used to describe the header of the HTML document. It can include the following tags: 



1. The <TITLE> tag:

Defines the title of the document. Can occur only once.

For example:

<HEAD>
<TITLE> Book Your Hotel</TITLE>
</HEAD>

The output of the preceding code snippet is displayed, as shown in the following figure.

2. The <META> tag:

Provides additional information about the current document in the form of name and value pairs.

For example:

<META name="description" content="This website provides you the benefit of booking rooms in the best hotels of US">
<META name="keywords" content="hotel, online, booking ">
<META name="author" content="Harry Anem">
<META http-equiv="refresh" content="30">


3. The <BASE> tag:
Specifies a base URL or address for all the related links on a page.

For example:

	<HTML>
<HEAD>
<TITLE> The BASE tag Example</TITLE>
<BASE href="d:/Images/">
</HEAD>
<BODY>
<IMG src="img1.jpg">
<BR>
Best Hotels
</BODY>
</HTML>

4. The <STYLE> tag:

Defines the style information associated with the HTML document. (To use Internal CSS)

For Example:

<head>
<style type="text/css">
p
{
background:red;
}
</style>
</head>

5. The <LINK> tag:

It is used to establish the relationship of the current document with other documents in a website. Consider the following code snippet to link the style sheet named StyleHome.css with an HTML file named home.html:
For Example:

<LINK href="StyleHome.css" rel="stylesheet"/>

6. The <SCRIPT> tag:

Specifies the client-side script, such as JavaScript, associated with the document.

For Example:


<script type="text/javascript">
//java script Code
</script>

7. The <NOSCRIPT> tag:

Displays an alternate content on the browsers on which the scripts have been disabled.




Html : HEAD Tag Program List




CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad