How to used meta tag explain in html



meta-data is represented by the <meta> tag in html. The function of <meta> tag is to give information of your web page, if you say in simple language, <meta> tag provides information about HTML document.


The content or code of the <meta> tag in Html is not visible on the web page. Meta-data is only used by browsers and search engines. Search engines and browsers provide information about web pages only through <meta> tags.


For example, take the search engine of google because google's search engine shows us the result only through meta-data. What we search for.


<meta> tag in html is very important for Search Engine Optimization (SEO). Always <meta> tag is written under <head> tag. 


Importance of Meta Tags

  • Document Title, Content Description (Summary), Keywords, etc. are defined by Meta Tag.
  • The viewport (the screen visible to the readers) setting is defined by Meta Tag.
  • Cookies, URLs, redirection, etc. are also defined by Meta tags.
  • Meta Information helps us index our web pages.
  • Meta Data is also required for SEO - Search Engine Optimization.
  • The <meta> tag is an open-source tag, there is no need to create a separate closing tag
  • Meta tags are always defined in the Header of the webpage.

Commonly Used Attributes of  Meta Tag

Both Global Attributes and Event Attributes are supported by Meta Element. Apart from these, there are some Element Specific Attributes, which are defined only in Meta Element. The details of which are given below. 

  • charset - Its full name is Character Setting. Character Encoding of HTML Document is defined by this Attribute. If you do not Define Encoding, then Browser uses Default Encoding.
  • Content - This Attribute Name and HTTP-Equiv of Attributes Value are Define.
  • text - The name of Meta Data is defined by this Attribute. Its possible value can be application name, author, description, generator, keywords, viewport.
  • HTTP-Equiv - This Attribute defines the HTTP Header for Define Value by Content Attribute.

Types of meta tags 

  • Meta Description
  • Meta Keywords
  • Meta View
  • Meta Refresh
  • Meta Author Name
  • Meta Charset