Basic tags used in head tag

1

In a html page we all know there is basic tag we need to use which is “Head”. We also call it the header of the webpage, because this tag holds all kind of summary of the webpage. Usually any search engine takes the simple record of a webpage from the header. Only the title tag can be displayed to the users other than the title rest of the information is used only for search engines. Before we start briefly I would like to mention the basic structure of a webpage and then I would like to mention the tags that are used in between head tag.

Basic structure of a webpage:

<html>

<head>

</head>

<body>

</body>

</html>

Basic tags that are usually used in head of a html file.

  1. Title
  2. Style
  3. Link
  4. Meta
  5. Script
  6. Base
  7. Noscript

Title

Title tag defines the title of the webpage. It is required in a html webpage. This name is important for so many reasons. The most important reason here is search engine optimization. Search engines will follow this title tag first to index on the database. Not only that, the search engine will show the page title as a search result.

Style

Style tag is another tag that is usually used in head tag. It is used to apply CSS to design the html tags, classes or ids. As we all know CSS is the style sheet for the design purpose. This is usually applicable in case of static web pages.

 Link

Link is another tag that helps us to link another css file to a html file. Instead of writing the CSS codes within the html file we can create another file to write the CSS, and then we can add those files in html.

Meta

Meta tag is another important part of head section. It usually used for define data or character set. Meta tag usually defines the character set or the webpage. The option used for this is “charset”. The second option here is “name”. we can define name using four different options.

  1. Description
  2. Keywords
  3. Author
  4. Viewport

Description is known as Meta description which is shown when the search engine shows some information about the webpage. This is a very important issue for SEO.

Keywords are basically we need for SEO of the webpage. This is another issue that can help us make our webpage popular.

Author is an optional thing in case of meta tag. It usually shows as an warning if we do not put anything there. But the best practice is to put an author name to every single webpage.

Viewport is a new option here. This is used for making the webpage responsive according to devices.

Script

This tag can be used in anywhere within the html tags. But it is used to include all the scripts at the beginning of the html file. Also as this is a client side script, so it needs to be put at the beginning to be interactive. Yet we can put it anywhere in the html tags.

Base

This tag is used to define a url or a target. This must be put in between the head tags. It is better to have both starting base tag and ending base tag. But we can use it with just starting tag. The url should be put using href parameter.

Noscript

Noscript is the element where we cannot use scripts. Using this element we can run scripts where either the browsers do not support scripting or somehow the user disabled the script. Within this tag we can use only link, meta and style. So this is only used when it is must to use.

1 Comment
  1. Pooja says

    Being a science student it’s very difficult to understand the website settings…this blog helped me a lot

Leave A Reply

Your email address will not be published.