HTML metadata - how to use <meta> tag

The HTML <meta> tag is used to define the meta data for a HTML document. Meta data means data about data. Meta data is not displayed on the page but it is used by search engines. Meta data is usually used to describe a page, provide additional keywords, author of the document, file's character encoding and viewport that can be used to define visible area for browsers.

The <meta> tag is placed within the <head> tag.


The meta tag supports the global and event attributes.

Defines the character encoding for the document
Defines the value associated with the http-equiv or name attribute
Defines HTTP header for the content attribute
Defines the name / type of meta data. Available options are:
  • application-name
  • author
  • description
  • generator
  • keywords
  • viewport


<head> <meta name="keywords" content="HTML, Meta Tags, Metadata" /> <meta name="description" content="Meta Tags allow adding keywords and description to a webpage" /> <meta name="revised" content=", 3/9/2016" /> <!--refresh every 5 seconds--> <meta http-equiv="refresh" content="5" /> <!--redirect in 5 seconds--> <meta http-equiv="refresh" content="5; url=" /> <!--redirect immediately--> <meta http-equiv="refresh" content="0; url=" /> <!--utf-8--> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!--chinese characters--> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <meta name="author" content="Faragta Learning" /> <!--create a cookie--> <meta http-equiv="cookie" content="color=red; expires=Thursday, 25-Aug-16 23:59:59 GMT;" /> </head>

Useful links: