HTML Meta

HTML META tag is used to define list of keywords, document, author etc it does not have closing tag.
In web page metadata place using <meta> tag inside <head> tag.

Meta Tag Attributes

Name
Property name for examples keywords, description, author etc.
content
Define the property’s value.
http-equiv
Used for http response message . For example http-equiv can be used to set a cookie or refresh the page .

Define Description

<meta> tag is used to define a short description about the web page document.

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta name="keywords" content="Keyword1,Keyword2,Keyword3" />
<meta name="description" content="Web page description" />
</head>
<body>
Content Goes Here</body>
</html>

Define Keywords
<meta> tag is used to define keywords related to the web page which keywords are helpful in search engines .

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta name="keywords" content="Keyword1,Keyword2,Keyword3" />
</head>
<body>
Content Goes Here…
</body>
</html>

Define Author Name
<meta> tag is used to set an author name in a web page .

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta name="keywords" content="Keyword1,Keyword2,Keyword3" />
<meta name="description" content="Web page description" />
<meta name="author" content="Dharmender Chauhan" />
</head>
<body>
Content Goes Here
</body>
</html>

Define Character Set
In HTML <meta> tag to define character set with webpage.

Example

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta name="keywords" content="Keyword1,Keyword2,Keyword3" />
<meta name="description" content="Web page description" />
<meta name="author” content="Dharmender Chauhan" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
Content Goes Here
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *