Skip to main content

HTML head Elements

The HTML head Element

The head element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>, <base>, <link>, <meta>, <script>, and <style>.

The HTML title Element

The <title> tag defines the title of the document.
The title element is required in all HTML/XHTML documents.

The title element:
  • defines a title in the browser toolbar
  • provides a title for the page when it is added to favorites
  • displays a title for the page in search-engine results
A simplified HTML document:
<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>


The HTML base Element

The <base> tag specifies a default address or a default target for all links on a page:
<head>
<base href="http://www.w3schools.com/images/" />
<base target="_blank" />
</head>


The HTML link Element

The <link> tag defines the relationship between a document and an external resource.
The <link> tag is most used to link to style sheets:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>


The HTML style Element

The <style> tag is used to define style information for an HTML document.
Inside the style element you specify how HTML elements should render in a browser:
<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>


The HTML meta Element

The <meta> tag provides metadata about the HTML document.
The meta element will be explained in the next chapter.

The HTML script Element

The <script> tag is used to define a client-side script, such as a JavaScript.
The script element will be explained in a later chapter.

HTML head Elements

Tag Description
<head> Defines information about the document
<title> Defines the title of a document
<base /> Defines a default address or a default target for all links on a page
<link /> Defines the relationship between a document and an external resource
<meta /> Defines metadata about an HTML document
<script> Defines a client-side script
<style> Defines style information for a document

Comments

Popular posts from this blog

Invigilators caught helping relatives during exams

HYDERABAD: The Chairman Board of Intermediate and Secondary Education (BISE) Hyderabad Abdul Aleem Khanzada, on Monday, detected four invigilators helping their sisters and daughters in cheating during Higher Secondary School Certificate Part-I and Part-II Annual Examinations 2012. According to a spokesman, the Chairman BISE Hyderabad caught these invigilators red handed during his surprise visit to examination centres of Tando Allahyar and Chambar along with his team members. While taking spot action, the Chairman BISE Hyderabad has relieved these four invigilators from the duty of conducting examinations. Besides, he also caught red handed 21 male and female candidates who were engaged in copying in the examinations. The other vigilance committees of the board which conducted surprise visits to Hyderabad, Shaheed Benazirabad, Matiari, Tando Allahyar, Tando Muhammad Khan, Badin, Thatta, Jamshoro and Dadu districts detected 144 male and female candidates engaged in copying during the

Ufone TV Commercials Free To View or Download

30 Second Offer Sim Lagao Offer Ufone Winner Offer