Javatpoint Logo
Javatpoint Logo

HTML <meta> tag

HTML <meta> tag is used to represent the metadata about the HTML document. It specifies page description, keywords, copyright, language, author of the documents, etc.

The metadata does not display on the webpage, but it is used by search engines, browsers and other web services which scan the site or webpage to know about the webpage.

With the help of meta tag, you can experiment and preview that how your webpage will render on the browser.

The <meta> tag is placed within the <head> tag, and it can be used more than one times in a document.

Syntax:

Following are some specifications about the HTML <meta> tag

Display None
Start tag/End tag Empty Tag(Only Start tag)
Usage Document Structural

Following are some specific syntaxes of meta tag which shows the different uses of meta Tag.

It defines the character encoding. The value of charset is "utf-8" which means it will support to display any language.

It specifies the list of keyword which is used by search engines.

It defines the website description which is useful to provide relevant search performed by search engines.

It specifies the author of the page. It is useful to extract author information by Content management system automatically.

It specifies to provide instruction to the browser to automatically refresh the content after every 50sec (or any given time).

In the above example we have set a URL with content so it will automatically redirect to the given page after the provided time.

It specifies the viewport to control the page dimension and scaling so that our website looks good on all devices. If this tag is present, it indicates that this page is mobile device supported.

Example

Test it Now

Attribute:

Tag-specific attributes:

HTML Tags List = New in HTML5

Attribute Value Description
charsetHTML Tags List character_set It specifies the character encoding of an HTML page.
content text It contains the value of the attribute "name" and "http-equiv" in an HTML document, depending on context.
http-equiv
  • Content-type
  • default-style
  • refresh
It specifies the Information given by the web server about how the web page should be served.
name
  • application-name
  • author
  • description
  • generator
  • keywords
It specifies the name of document-level metadata.
scheme format/URL It specifies the scheme in which metadata is described. (Not Supported in HTML5)

Global attribute:

The <meta> tag supports the global attributes in HTML

Event attribute:

The <meta> tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<meta>YesYesYesYesYes
Next TopicHTML meter Tag





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA