Why use Metadata in HTML?

<meta> attributes and its values

  • charset: It specifies the character encoding for the HTML document. Common values: UTF-8 (Character encoding for Unicode) and ISO-8859–1 (Character encoding for the Latin alphabet).
  • content: It specifies the value associated with the http-equiv or name attribute.
  • http-equiv: It provides an HTTP header for the information/value of the content attribute. It can be used to simulate an HTTP response header. Common values: content-security-policy (Specifies a content policy for the document), content-type (Specifies the character encoding for the document), default-style (Specified the preferred style sheet to use), and refresh (Defines a time interval for the document to refresh itself).
  • name: It specifies a name for the metadata. Common values: application-name (Specifies the name of the Web application that the page represents), author (Specifies the name of the author of the document), description (Specifies a description of the page), generator (Specifies one of the software packages used to generate the document), keywords (Specifies a comma-separated list of keywords — relevant to the page), and viewport (Controls the viewport i.e. the user’s visible area of a web page).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhay Jain

Abhay Jain

Developer with 3 yrs of industrial experience in developing scalable web applications.