Metadata means data about data.
Meta tag/element in a HTML page gives information about that HTML page.
Meta tag should be placed inside the head section of the HTML webpage.
They are used to provide metadata such as Keywords, description and author.
Metadata will not be displayed on the webpage. But it will be used by browser and search engines.
Attributes of the Metatag are content, http-equiv, name and scheme. Content is the mandatory attribute.
Find below some sample meta data.
<meta http-equiv="Content-Type" content="text/html" />
It is used for specifying http header which should be delivered before sending actual content of the page. It notifies the browser that the content should be displayed as the html file.
Some years back search engines used "Keywords" for ranking the webpages when displaying search results.
The Keywords for the webpage can be added using below meta tag.
<meta name="keywords" content="quality, php, qtp, c#" />
But anyway, these days Search engines won't give much importance for these keywords as many webmasters are giving wrong keywords to attract more visitors to their site.
And also, meta tag can be used to automatically refresh the page at particular interval. It will useful for showing Cricket score.
Find below the sample code for automatic page refresh.
<meta http-equiv="refresh" content="600">
Even we can use this metatag for redirecting to another page after preset time.
<meta http-equiv="refresh" content="5;url=http://www.qualitypointtech.com">
The above code will redirect to qualitypointtech.com after 5 seconds.
You can see it by putting this code in Head section of an HTML page.