HTML head Tag

  • HTML <head> tag defines header section of HTML document. The <head> tags contains other HTML tags that contains metadata including title, meta, links, styles, scripts. It should be first tag inside an <html> tag.

  • The <title> tag is most important tag within the <head> tag. Other HTML tags <meta>, <style>, <script>, <link>, and <base> enclosed within the <head> tag.

Example

<!DOCTYPE html>
<html>
<head>
  <title>HTML head tag</title>
</head>
<body>
  <p>Page Body...</p>
</body>
</html>

Run it...   »

<head> Tag Attributes

HTML <head> tag support following specific attributes.

Attributes Value Description
profile url Specify one or more meta data profiles URL separated by white space.

Global Attributes

HTML <head> tag does not support any global attributes.

Event Attributes

HTML <head> tag does not support any event attributes.

Browser Compatibility

  • Google Chrome
    Yes
  • Mozilla Firefox
    Yes
  • Microsoft Edge
    Yes
  • Opera
    Yes
  • Safari
    Yes