HTML Tag Reference - HTML tag <head>








This <head> element creates the header section of an HTML document. In the header section, you can define the title of the document, establish links to CSS style sheets, reference JavaScript code, and so on.

Browser compatibility

<head> Yes Yes Yes Yes Yes

What's new in HTML5

The profile attribute is not supported in HTML5.

Attribute

profile
Not supported in HTML5. a URL to a document that contains a set of rules.




Example

A demo showing how to use <head> tag.

<html>
    <head>
        <title>head element example</title>
        <link rel="stylesheet" type="text/css" href="yourstylesheet.css"
        <script language="javascript">
        alert("Hello World");
        </script>
    </head>
    <body>This is the content of the page
    </body>
</html>