HTML <Meta> Tag

HTMLWeb DevelopmentFront End Technology

The <meta> element in HTML is used to describe metadata i.e. the description, keywords, document’s author, etc. This metadata won’t be displayed on the page, but is used by the search engines, web browsers, etc.

Now, you can also set the viewport under <meta> to set the dimensions of the web page −

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Following are the attributes −

Sr.NoType & Description
Name for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
Specifies the property's value.
3scheme (deprecated)
Specifies a scheme to interpret the property's value (as declared in the content attribute).
Used for http response message headers. For example, http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.
The character encoding.


Let us now see an example to implement the <meta> tag −

 Live Demo

<!DOCTYPE html>
<meta name="description" content="Learn for free">
<meta name="keywords" content="Video tutorials, free tutorials, learn, web">
<meta http-equiv="refresh" content="20">
<meta name="author" content="Jack Sparrow">
<p>Programming tutorials for free:</p>


This will produce the following output −

Published on 17-Sep-2019 09:10:24