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.




Qus. 1 : In which part of the HTML metadata is contained?

  1. body tag
  2. html tag
  3. head tag
  4. title tag
Qus. 2 : What is the value of rel attribute to describe a favicon?

  1. favicon
  2. image
  3. icon
  4. fav
Qus. 3 : The page title is inside the____tag.

  1. Body
  2. Head
  3. Division
  4. Table
Qus. 4 : HTML metadata is present in which of the following tags?

  1. <Head>
  2. <body>
  3. <title>
  4. <p>
Qus. 5 : Meta tag is used for?

  1. To store information usually relevant to browsers and search engines
  2. To only store information usually relevant to browsers
  3. To only store information about search engines
  4. To store information about external links

Programs

HTML code to display country name in red color

View Solution


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad