Google+ logo Twitter logo Youtube logo

The <head> tag


The <head> tag

The <head> tag can be used to define information about the HTML document. In this example we're going to define the title of the page and load an external stylesheet.

An external stylesheet is a seperate document with only CSS code in it. A seperate document with CSS code is called a stylesheet.

Here's an example with several orange headings in a HTML document;

<html>
	<head>
		<title>Some page with several headings</title>
		<link rel="stylesheet" type="text/css" href="styledocument.css">
	</head>
	<body>
		<h1 class="oranje-kop">Oranje heading</h1>
		<h1 class="oranje-kop">Another heading</h1>
		<h1 class="oranje-kop">Another heading</h1>
		<h1 class="oranje-kop">Another heading</h1>
	</body>
</html>
In the example above we can see the following;
  • The <html> tag contains all HTML elements
  • The <head> tag contains information about this HTML document. Here we can see a (<title> tag) and a reference to an external stylesheet (<link> tag)
  • The <body> tag contains all visible elements.


Leave a comment ...

Name (will be visible)
E-mailaddress (will not be shown)
Comment
Type the code illustrated below

Back to top