In this illustration, We will introduce you about the <meta> tag in html5.
In this illustration, We will introduce you about the <meta> tag in html5.In this illustration, We will introduce you about the <meta> tag in html5. The <meta> tag is used to specify the metadata of the document. It provides the information for search engiene of your page such as descriptions, keywords, content, refresh rate etc. The meta tag is used within <head> </head> tag.
The syntax of the <meta> tag is as:
<meta name="value" content="value" http-equiv="value" charset="value"/> |
This tag have the four attributes are as:
name="value" The name attribute have the following values:
application-name- This value represents the name of the web-application and is used when page is a web application.
author- The value is a string must specify the name of the author of the page.
description- This value specify the description of the web page.
generator- This value specify the name of software package used.
keyword- These are comma saprated values represents the keyword of the page.
http-equiv="value" This attribute have the following values:
content-language- The language of the document.
content-type- The MIME type of the document.
default-style- To give the style sheet set.
refresh- To set the refresh time for the page
content="value" This attribute specify the metadata of the document.
charset="value" This attribute define the character encoding used in the document.
Example: meta_tag.html.
<!DOCTYPE html> <html> <head> <title>Example of meta Tag</title> <meta name="detail" content="html5 tutorials"/> <meta name="keywords" content="html5 meta tag,meta tag"/> <meta name="genrator" content="Frontpage"/> <meta http-equiv="refresh" content="4"/> <meta charset="utf-8"/> </head> <body> The data within the head tag is not displayed on web page. </body> </html> |
Output:
NOTE: When you show the page info or properties all the information will be displayed.
Difference between HTML5 and HTML4:
The scheme attribute is removed from the html5 and a new attribute charset is introduced in html5.