HTML meta Tag Explained
HTML Meta Tag
In HTML, the <meta> tag is used to represent metadata.
- This meta-data represented by
<meta>tag cannot be represented using other HTML tags like<base>,<link>,<script>,<style>and<title> - The
<meta>tag comes under the category of Empty elements. - Metadata will not be displayed on the web page and metadata is used by browsers and search engines.
- Metadata is simply data about data or it is information about the data.
- The
<meta>tag is always used inside<head>tag in an HTML Document.
HTML <meta> Tag Syntax and Usage
As <meta> is an empty tag, it does not require an end tag it only requires a start tag.
The basic syntax for the same is given below:
<meta charset=" ">HTML <meta> Tag Attributes
The <meta> tag supports both global and event attributes and some of the common attributes are given below.
| Attributes | Description |
| charset | This attribute is used to declare the web page's character encoding. Its value is character_set |
| name |
|
| content | It contains the value of name or http-equiv attribute depending on which is used. |
| http-equiv | This attribute is used to provide an http-header for the information of the content attribute. This attribute's instructions are as given follows:-
|
HTML <meta> Tag Basic Example
Below we have a basic example of the <meta> tag:
<meta charset="utf-8">
<!-- Redirect page after 3 seconds -->
<meta http-equiv="refresh" content="3;url="https://www.studytonight.com/">Syntax to define Keyword for Search Engine
<meta name="keywords" content="Java,python,jQuery">Syntax to define the author of the Page
<meta name="author" content="Himani">Syntax to refresh the document
<meta http-equiv="refresh" content="10">
// it will refresh document after every 10 secondsBrowser Support for HTML5 <meta> tag
Following browsers support this attribute:
- Firefox 1+
- Google Chrome 1+
- Internet Explorer 2+
- Safari 1+
- Opera 4+










