What is meta element in HTML?

meta represents various kinds of metadatadata (information) about data that can not be represented by other HTML metadata-related elements.

Where to use the <meta> tag?

Similar to all HTML tags, a meta element is placed inside tags (<>): <meta>. It is an empty tag that does not require the closing tag (</>). Additionally, the meta element is always placed inside the <head> tag. <meta> tags represent:

  • page description
  • author of the document
  • keywords
  • character set
  • viewport settings

Code

With the meta element, a user can provide metadata if the following attributes are set:

  • name attribute: provides document-level metadata and applies it to the whole page.
Meta element using 'name' attribute
  • http-equiv attribute: a pragma directive that provides information equivalent similar to HTTP header.
Meta element using "http-equiv" attrbiute
  • charset attribute: a character set declaration that gives the character encoding to the document encoded.
Meta element using "charset" attribute.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved