Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html

What is meta element in HTML?

Dian Us Suqlain

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

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.

RELATED TAGS

html

CONTRIBUTOR

Dian Us Suqlain
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring