The output of the above example will be an HTML page with the title "Meta Tag Sample Page". The metadata provided by the <meta>
tags will not be visible on the page.
Explanation
The <meta>
tag has two attributes: name
and content
. The name
attribute specifies the type of metadata being provided, while the content
attribute specifies the value of the metadata.
In the example above, the first <meta>
tag provides a description of the page, while the second <meta>
tag provides keywords that are relevant to the page.
Use
The <meta>
tag is commonly used to provide metadata about a webpage. Some common uses of the <meta>
tag include providing a description of the page, specifying keywords relevant to the page, disabling caching of the webpage, and specifying the character encoding of the page.
Important Points
- The
<meta>
tag is usually placed in the <head>
section of an HTML document.
- The
name
attribute specifies the type of metadata being provided, while the content
attribute specifies the value of the metadata.
- The metadata provided by the
<meta>
tag is used mainly by search engines and browsers and is not displayed on the page.
- The
<meta>
tag is commonly used to provide a description of the page, specify keywords relevant to the page, disable caching of the webpage, and specify the character encoding of the page.
Summary
The <meta>
tag is an HTML tag used to provide metadata about an HTML document. It is placed in the <head>
section of an HTML document and is used mainly by search engines and browsers. The tag has two attributes: name
and content
, which specify the type and value of the metadata respectively. Some common uses of the <meta>
tag include providing a description of the page, specifying keywords relevant to the page, disabling caching of the webpage, and specifying the character encoding of the page.