Sunday 15 October 2017

HTML gives you a chance to indicate metadata - extra critical data about an archive in an assortment of ways. The META components can be utilized to incorporate name/esteem sets portraying properties of the HTML record, for example, creator, expiry date, a rundown of catchphrases, archive creator and so forth. 

The <meta> tag is utilized to give such extra data. This tag is an unfilled component thus does not have an end tag but rather it conveys data inside its traits. 

You can incorporate at least one meta labels in your report in light of what data you need to keep in your archive however as a rule, meta labels don't affect physical appearance of the record so from appearance perspective, it doesn't make a difference on the off chance that you incorporate them or not. 

Adding Meta Tags to Your Documents 

You can add metadata to your site pages by setting <meta> labels inside the header of the archive which is spoken to by <head> and </head> labels. A meta tag can have following credits notwithstanding center characteristics − 

Sr.NoAttribute & Description
1
Name
Name for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
2
content
Specifies the property's value.
3
scheme
Specifies a scheme to interpret the property's value (as declared in the content attribute).
4
http-equiv
Used for http response message headers. For example, http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.

Determining Keywords 

You can utilize <meta> tag to determine essential watchwords identified with the archive and later these catchphrases are utilized by the web indexes while ordering your page for seeking reason. 

Case 

Following is a case, where we are including HTML, Meta Tags, Metadata as imperative catchphrases about the report. 

<!DOCTYPE html>
<html>
   
   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
   </head>
   
   <body>
      <p>Hello HTML5!</p>
   </body>
   
</html>

Archive Description 

You can utilize <meta> tag to give a short depiction about the report. This again can be utilized by different web search tools while ordering your website page for looking reason. 

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
   
</html>
Record Revision Date 

You can utilize <meta> tag to give data about when last time the record was refreshed. This data can be utilized by different web programs while reviving your site page. 

Illustration 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "revised" content = "googletech786, 3/7/2014" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>
Record Refreshing 

A <meta> tag can be utilized to determine a length after which your site page will continue invigorating consequently. 

Illustration 

On the off chance that you need your page continue reviving after like clockwork at that point utilize the accompanying language structure. 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "revised" content = "googletech786, 3/7/2014" />
      <meta http-equiv = "refresh" content = "5" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>
Page Redirection 

You can utilize <meta> tag to divert your page to some other website page. You can likewise indicate a span in the event that you need to divert the page following a specific number of seconds. 

Illustration 

Following is a case of diverting current page to another page following 5 seconds. On the off chance that you need to divert page promptly then don't determine content characteristic. 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "revised" content = "googletech786, 3/7/2014" />
      <meta http-equiv = "refresh" content = "5; url = http://www.googletech786.com" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>

Setting Cookies 

Treats are information, put away in little content records on your PC and it is traded between web program and web server to monitor different data in light of your web application require. 

You can utilize <meta> tag to store treats on customer side and later this data can be utilized by the Web Server to track a website guest. 

Case 

Following is a case of diverting current page to another page following 5 seconds. On the off chance that you need to divert page promptly then don't indicate content property. 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "revised" content = "googletech786, 3/7/2014" />
      <meta http-equiv = "cookie" content = "userid = xyz;
         expires = Wednesday, 08-Aug-15 23:59:59 GMT;" />
         
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>
On the off chance that you do exclude the termination date and time, the treat is viewed as a session treat and will be erased when the client leaves the program. 

Note − You can check PHP and Cookies instructional exercise for a total detail on Cookies. 

Setting Author Name 

You can set a creator name in a page utilizing meta tag. See a case underneath − 

Case 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "author" content = "Rizvi" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>
Indicate Character Set 

You can utilize <meta> tag to indicate character set utilized inside the site page. 

Case 

Naturally, Web servers and Web programs utilize ISO-8859-1 (Latin1) encoding to process Web pages. Following is a case to set UTF-8 encoding − 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "author" content = "Rizvi" />
      <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>
To serve the static page with conventional Chinese characters, the page must contain a <meta> tag to set Big5 encoding − 

<!DOCTYPE html>
<html>

   <head>
      <title>Meta Tags Example</title>
      <meta name = "keywords" content = "HTML, Meta Tags, Metadata" />
      <meta name = "description" content = "Learning about Meta Tags." />
      <meta name = "author" content = "Rizvi" />
      <meta http-equiv = "Content-Type" content = "text/html; charset = Big5" />
   </head>
	
   <body>
      <p>Hello HTML5!</p>
   </body>
	
</html>

0 comments:

Translate

GoogleTech786. Powered by Blogger.

Subscribe Youtube

Our Facebook Page

Wikipedia

Search results

Popular Posts

Adsense