Recents in Beach

META TAGS IN HTML

 META TAGS IN HTML



META TAGS IN HTML defines additional important information about a document in a variety of ways.  Metadata is data (information) about data ,The META elements can be used to include name/value pairs describing properties of the HTML document, such as author, expiry date, a list of keywords, document author etc. Metadata is used by browsers (how to display content or reload page), search engines (keywords), and other web services.

 Meta tag is an empty element and does not have a closing tag but it carries information within its attributes. we can include more than one meta tags in your document based on what information we want to keep in your document but in general, meta tags do not impact physical appearance of the document so from appearance point of view, it is optional to include meta tags In our code.

How to Add Meta tags in our code

We can add metadata in our web pages by placing <meta> tags inside the header of the document which is represented by <head> and </head> tags. A meta tag can have following attributes in addition to core attributes

 

Attribute  

Description

 

scheme

Specifies a scheme to interpret the property's value (as declared in the content attribute).

content

Tells about the property's value

Name  

Name for the property. Can be anything. Examples keywords,name,place,author,etc.

 

httpequiv

 

http is used for response message headers. For example, http-equiv can be used to refresh the page(content) or to set a cookie. Values include content-type, expires, refresh and set-cookie

Document Refreshing

 This meta tag is used to specify a duration after which the web page will keep refreshing automatically after the given duration. Example is given below to refresh our web page in every 15 sec.

<!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="launchpadlwd" />

<meta http-equiv="refresh" content="15" />  

</head>

<body>

<p>Welcome To Launchpadlwd</p>

</body>

</html>

 


Page Redirection

We can use <meta> tag to redirect our page to any other web pages. we can simply specify a duration if we want to redirect the page after a certain number of time.

<!DOCTYPE html>

<html>

<head>

<title>Meta Tags Example</title>

<meta name="keywords" content="HTML, Meta Tags, Metadata" />

<meta name="description" content=”Meta Tags in html." />

<meta name="revised" content="launchpadlwd blog" />

<meta http-equiv="refresh" content="15; url=http://www.launchpadlwd.xyz" />

</head>

<body>

<p>Welcome To Launchpadlwd</p>

</body>

</html>

                                     

Document Revision Date

 This <meta> tag to give information about when last time the document was updated. This information can be used by various web browsers while refreshing our webpage.

<!DOCTYPE html>

<html>

<head>

<title>Meta Tags Example</title>

<meta name="keywords" content="HTML,Metadata,Meta Tags" />

<meta name="description" content="Meta Tags In Html." />

<meta name="revised" content="Launchpadlwd bog" />

</head>

<body>

<p>Welcome To Launchpadlwd</p>

</body>

</html>

                               

Setting Cookies

We can use <meta> tag to store cookies on client side and later this information can be used by the Web Server to track a site visitor .Cookies are data, stored in small text files on your computer and it is exchanged between web browser and web server to keep track of various information based on our web application needs.

 

<!DOCTYPE html>

<html>

<head>

<title>Meta Tags Example</title>

<meta name="keywords" content="HTML,Metadata,Meta Tags" />

<meta name="description" content="Meta Tags In Html." />

<meta name="revised" content="Launchpadlwd bog" />

</head>

<body>

<p>Welcome To Launchpadlwd</p>

</body>

</html>

                   

Document Description

 We can use <meta> tag to give a short description about the document. This  can be used by various search engines Optimization (SEO) while indexing your webpage for searching purpose

<!DOCTYPE html>

<html>

<head>

<title>Meta Tags Example</title>

<meta name="keywords" content="HTML,Metadata,Metatags" />

<meta name="description" content="Meta Tags In Html." />

</head>

<body>

<p>Welcome To Launchpadlwd</p>

</body>

</html>

                            

Specifying Keywords

We can use <meta> tag to specify important keywords related to the document. This keywords are used by the search engine optimization (SEO) while indexing your webpage for search Results.

 

<!DOCTYPE html>

<html>

<head>

<title>Meta Tags Example</title>

<meta name="keywords" content="HTML, Metadata, Meta tags" />

</head>

<body>

<h2>Welcome to launchpadlwd</h2>

</body>

</html>

                             


To Study More About Html Tags Please Visit this link:

https://www.launchpadlwd.xyz/search/label/HTML?&max-results=8


Post a Comment

0 Comments