The <meta> element is used to add metadata to a document. Normally, it provides descriptive keywords for search engines. The <meta> element can also provide different kinds of HTTP request, such as refresh rates and expiration time. It defines name/value pairs that relate the document.
Here's an example of the name/value pairs:
name="keywords" content="book, web development"
or
http-equive="Content-Type" content="text/html; charset=utf-8"
Listed below are the most common attributes you can use for this element:
- name - provides the name of the name/value pair. The most common used name is "keywords".
- http-equive - provides the name of the name/value pair and tells the server to attach the name/value pair in the HTTP header field that will be passed to the browser before sending the actual document.
- content - provides the value of the name/value pair. The value can be any valid string. bit it should always be joined to either the name or http-equive attributes.
Here's an example on how to use the <mate> element:
<!DOCTYPE html PUBLIC "-//W3C //DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<mata http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<meta name="keywords" content="book, web development" />
<title>Document Metadata Example</title>
</head>
<body>
<h1>
Document Metadata Example
</h1>
</body>
</html>
0 comments:
Post a Comment