HTML head tag

  • <head> tag represents the area that the CSS and JavaScript files are involved alongside meta tags that allow search engines to recognize our site. It does not lead to any change in page outlook.
  • The writings within head tag does not appear on the site-thus, on the browser. Within head tag, we can define title tag, meta tag, link tag, style tag, and script tag.
  • <head> tag comes after tag and before , and its usage is as follows.

The tags that can be used within head are:

  1. title tag
  2. meta tag
  3. link tag
  4. style tag
  5. script tag

HTML head tag

<html>
<head>
    
</head>

<body>
</body> 

</html>

HTML head tag (title)

<html>
<head>
    <title>csstutorial</title>
</head>

<body>
</body> 

</html>

HTML head tag (style)

<html>
<head>
    <style>
    body{
      background: blue;
     }
    </style>
</head>

<body>
</body> 

</html>

HTML head tag (script)

<html>
<head>
    <script>
       console.log("Welcome");
    </script>
</head>

<body>
</body> 

</html>

HTML head tag (meta tags)

<html>
<head>
    <meta name="author" content="csstutorial">
    <meta name="description" content="Html,Css and JS tutorials for Front End Developers> 
    <meta name="keywords" content="Html, Css, Javascript">
</head>

<body>
</body> 

</html>
478 Views
48490cookie-checkHTML head tag

Leave a Reply

Your email address will not be published. Required fields are marked *