<meta ...>

HTML4 HTML5

Inside the <meta> tag, we provide information about the document (metadata - data about data)[cite: 3]. Metadata is not displayed by the browser[cite: 3]. The <meta> tag can only appear at the beginning of the document in the <head> section[cite: 3]. Metadata is typically used to specify page topic description, author, keywords, creation date, modification date, etc[cite: 3].

Opening tag is mandatory, closing tag does not exist (disallowed)[cite: 3].

Attributes:

charset = "..." - document character encoding[cite: 3]

http-equiv = "..." - HTTP response header[cite: 3]

name ="..." - name of the metadata attribute[cite: 3]

content = "..." - value of the metadata attribute[cite: 3]

scheme = "..." - specifies the metadata interpretation scheme[cite: 3]. Not present in HTML5[cite: 3].

Example

<head>
  <meta charset="UTF-8">
  <meta name="description" content="Website about algorithms and programming">
  <meta name="keywords" content="Algorithms,Pascal,HTML,CSS">
  <meta name="author" content="JarosÅ‚aw Trzeciak">
</head>

In the first line, we specify the character set of the document - UTF8[cite: 3].

In the second line, we provide the website topic[cite: 3].

The third line contains keywords, which will most likely be used by search engine bots indexing web content[cite: 3].

The next line provides author data for the page[cite: 3].