<meta> : Metadata element

Introduction

The <meta> element in HTML is used to provide metadata about the HTML document. Metadata is data about data, which gives information about the HTML document itself rather than the content it contains. Metadata elements are typically placed within the <head> section of an HTML document.

Here’s how the <meta> element can be used:

In this example:

  • The <meta> element with the charset attribute specifies the character encoding used in the document. In this case, it’s set to UTF-8, which is a widely used encoding for handling text in different languages.
  • Other <meta> elements provide additional metadata:
    • description: Provides a brief description of the document.
    • keywords: Specifies a list of keywords relevant to the document.
    • author: Identifies the author of the document.

These <meta> elements are not displayed directly on the webpage but are instead used by browsers, search engines, and other web services for various purposes such as indexing, search engine optimization (SEO), and browser rendering. They help provide contextual information about the document, improve its accessibility, and enhance its discoverability on the web.

Leave a Comment