Skip to content

HTML Tags: head tags in HTML

  • by

In this post we will learn about the head tags in HTML, but before we start the explanation we would like to welcome you, our dear visitors, welcome.

The head tag in HTML:

The <head> tag is one of the most important elements of HTML. No HTML page is without this important element. For more details, visit this article.

The meta tag In HTML:

The <meta> element represents metadata that cannot be described by other HTML elements, such as a site description or the language called on the site.

The meta tag contains element attributes, among which are:

<meta charset="" />
<meta name="" content="" />

The charset value is specific to the languages ​​supported on the site. If you want your site to support all languages, enter the value utf-8.

<meta charset="utf-8" />

The name of the page has many values, and its value determines what is written in the page content.

Among the most important values:

<meta name="description" content="Site description" />
<meta name="keywords" content="The most important keywords for the site and the separation between them using the letter," />
<meta name="author" content="Author's name" />

The style Tag in HTML:

The <style> element contains CSS styles, which apply to HTML elements located in the body section of the document.

For example:

<style>
  body{
    color:red;
  }
</style>

The title tag in HTML:

The <title> element defines the document title that appears at the top; for more details, see the code below.</p>

<title>Page name</title>

The link tag in HTML:

Tag <link> This tag defines the relationship between the current document and external resources. This element is usually used to link an HTML document to CSS documents, and it is also used for other things.

This element contains element attributes, among which are:

<link rel="stylesheet" href="File path or link" />
<link rel="icon" href="Image path or link" />

The script tag in HTML:

The element <script> It is used to include executable code, mostly used to include JavaScript code.

This element can also be used to link an HTML document to a JAVASCRIPT document, via an attribute called src.

<script>JavaScript codes</script>
<script src="JavaScript file path"></script>

Important elements on the page HTML:

<DOCTYPE html!>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Page or website name</title>
  </head>
  <body>
  </body>
</html>

How to write all tags head On page HTML:

<DOCTYPE html!>
<html>

  <head>
    <meta charset="utf-8" />
    <meta name="description" content="Site description" />
    <meta name="keywords" content="The most important keywords for the website and how to differentiate between them." />
    <style>
      body{
        color:red;
      }
    </style>
    <link rel="icon" href="Image path or link" />
    <link rel="stylesheet" href="CSS file path" />
    <title>Page or website name</title>
  </head>

  <body>


    <script src="JavaScript file path"></script>
  </body>

</html>

Leave a Reply

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