HTML head - how to use <head> tag

The HTML <head> tag is used to define the meta data elements of a HTML document. The head tag contains other tags which are not rendered within the HTML document but contain meta information, links styles and CSS, links to JavaScript and can define scripts and can contain the title attribute. The title tag and some of the meta information are also used by search engines.

Attributes

The head tag supports the global and event attributes.

Examples:

<html> <head> <!--page title--> <title>demo page</title> <!--reference javascript file--> <script src="file.js"></script> <!--reference CSS file--> <link href="file.css" rel="stylesheet" /> <!--meta description--> <meta name="description" content="This is a demo page" /> </head> <body></body> </html>

Related HTML tags