The HTML <head> tag is used for indicating the head section of the HTML document. The <head> element is a container for all the head elements. The title is the only element that needs to exists inside the <head> tag.

Required Attributes

  • Needs to be inside the <html></html> tags
  • Needs to contain the <title> tag inside

Optional Attributes

  • The following elements can go inside the <head> element:
    • <title> (this element is required in the head section)
    • <style>
    • <base>
    • <link>
    • <meta>
    • <script>
    • <noscript>
  • Common attributes

Example

<html>
	<head>
		<title>Title of the document</title>
	</head>
	<body>
		The content of the document......
	</body>
</html>

Changes in HTML5

  • The profile attribute is not supported in HTML5.

Related Tags