Html meta tags and description

Html meta tags and description

Description of Meta Tags
HTML lets you specify metadata – information about a document rather than document content -in a variety of ways. The META element can be used to include name/value pairs describing properties of the HTML document, such as author, Expiry Date, a list of key words, author etc.The <meta> tag is an empty element and so does not have a closing tag, rather, <meta> tags carry information within attributes, so you need a forward slash character at the end of the element.Metadata provided by using meta tag is a very important part of the web. It can assist search engines in finding the best match when a user performs a search. Search engines will often look at any metadata attached to a page – especially keywords – and rank it higher than another page with less relevant metadata, or with no metadata at all.

Adding Meta Tags to Your Documents:

You can add metadata to your web pages by placing <meta> tags between the <head> and </head> tags. The can include the following attributes:

AttributeDescription
NameName for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
contentSpecifies the property’s value.
schemeSpecifies a scheme to use to interpret the property’s value (as declared in the content attribute).
http-equivUsed 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.

Specifying Keywords:

We specify keywords which will be used by the search engine to search a web page. So using following tag you can specify important keywords related to your page.

<head><meta name="keywords" content="HTML, meta tags, metadata" /></head>

Document Description:

This is again important information and many search engine use this information as well while searching a web page. So you should give an appropriate description of the page.

<head><meta name="description" content="Learn about Meta Tags." /></head>

Document Refreshing:

You can specify a duration after which your web page will keep refreshing. If you want your page keep refreshing after every 10 seconds then use the following syntax.

<head><meta http-equiv="refresh" content="10" /></head>

Page Redirection:

You can specify a page redirection using Meta Tag. Following is an example of redirecting current page to another page. You can specify a duration after which page will be redirected.If you don’t provide a duration then page will be redirected immediately.

<head><meta http-equiv="refresh" content="9; url=http://www.phpkida.com" /></head>

Setting Cookies:

You can use Meta Tag to store cookies on client side later information can be used by then Web Server to track a site visitor.


<head>
<meta http-equiv="cookie" content="userid=xyz; expires=Wednesday, 27-jun-00 23:59:59 GMT; />
</head>
If you do not include the expiration date and time, the cookie is considered a session cookie and will be deleted when the user exits the browser.

Setting Author Name:

You can set an author name in a web page using Meta Tag. See an example below:

<head><meta name="author" content="Mukesh jakhar" /></head>

If you do not include the expiration date and time, the cookie is considered a session cookie and will be deleted when the user exits the browser.Example : HTML Meta Tags.

<html lang=en>
<head>
<meta name="keywords" content="HTML, meta tags, metadata" />
<meta name="description" content="Learn about Meta Tags,html meta data, all metadata." />
<meta http-equiv="refresh" content="10" /><meta http-equiv="refresh" content="9; url=http://www.phpkida.com" />
<meta http-equiv="cookie" content="userid=xyz; expires=Wednesday, 27-jun-00 23:59:59 GMT; />
<meta name="author" content="Mukesh jakhar" />
<title> Html Meta Tags Examples </title>
</head>
<body>
    This page using meta tags.
</body>
</html>

Leave a Reply

Related Posts: You may like

html5 video tag Complete Guide

How to get multiple selected values of select box in php

Responsive contact form html css

How to increase size of radio button

Tools:

Crypto Currency

PHPKIDA provides free online the best real-time crypto market price, news, predictions, index with graphs & historical data for 2000+ coins including bitcoin, ethereum, & altcoins from major cryptocurrency exchanges.

Visite Tool

Icon Generator

PHPKIDA provides free online icon generator. Our icon generator help you to edit, modify, resize and customize icon for your website and applications. Convert to a shap you like add icon border, you can change icon border color, border size, background color, icon shadow, icons color, icon size in your own way and save it as a png image.

Visite Tool

Youtube Video Downloader

PHPKIDA provides Free online YouTube video downloader to download YouTube videos quickly in MP4, 3GP, and more. Search your video and free fast download youtube videos.

Visite Tool

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.