Monday, 11 June 2018

Chaudhari Karan

HTML – Meta Tags

    No comments:


HTML – Meta Tags

Hello friends, In this lecture, we will discuss HTML Meta Tags.

HTML – Meta Tags

HTML metadata - additional important information of the document in a variety of ways. The META elements are used to include name or value pairs describing properties of the HTML document, like the author, expiry date, a list of keywords, document author etc.

The tag is provide the additional information. It is an empty element and it does not have the closing tag and it carries information with its attributes.

One or more meta tags in the document are based on the information what you keep in your document, meta tags cannot impact the physical appearance of the document.

Adding Meta Tags to Your Documents


Add metadata to web pages using tags inside the header of the document.  It is represented by and tags. Here are meta tag attributes in addition to core attributes −

Attributes
                                                               Description
Name
It is used for giving the name for the property. For Example include, keywords, description, author, revised, generator etc.
Content
It specifies the property's value.
Scheme
The scheme is specifies to interpret the property's value as declared in the content attributes.
http-equiv
It is used for http response message headers. For example, it is used for refresh the page or to set the cookie. Values include content-type, expires, refresh and set-cookie.

Specifying Keywords


The tag to specify the important keywords related to the document and these keywords are used by the search engines while indexing webpage for searching purpose.

Example:
In this example, adding HTML, Meta Tags, Metadata as important keywords.

HTML Specifying Keywords

Output:
HTML Specifying Keywords




Document Description


The tag give the short description of the document. It is used by search engines while indexing webpage for searching.

Example:
HTML Document Description

Output:
HTML Document Description

Document Revision Date


The tag gives information when last time the document was updated. It is used by various web browsers while refreshing webpage.

Example:
HTML Document Revision Date

Document Refreshing


The tag is used to specify the duration after which web page will keep refreshing automatically.

Example:
If web page keeps refreshing after every 5 seconds then use the following syntax.

HTML Document Refreshing


Page Redirection


The tag to redirect webpage to another webpage. It specifies a duration if redirect the page after a certain number of seconds.

Example

In this example redirecting current page to another page after 5 seconds. If you want to redirect page immediately then not specify the content attribute.

HTML Page Redirection

Setting Cookies


Cookies are data which is stored in small text files on the computer. It is exchanged between the web browser and web server to track information based on web application need.

The tag to store cookies on the client side, this information used by the Web Server to track a site visitor.

Example

In this example redirecting current page to another page after 5 seconds. If redirect page immediately then do not specify the content attribute.

HTML Setting Cookies

Setting Author Name


For set the author name in a web page using meta tag.

Example:
HTML Setting Author Name

Specify Character Set


This tag to specify character set used with the webpage.

Example:

In default web, servers and web browsers use ISO-8859-1 Latin1 encoding to process Web pages. In this example UTF-8 encoding use.
HTML Specify Character Set


Set Big5 encoding to serve the static page with traditional Chinese characters.

HTML Specify Character Set

Subscribe to this Blog via Email :