मेटा नाम संपत्ति
उदाहरण
सभी मेटा तत्वों की सामग्री विशेषता का मान लौटाएँ:
var x = document.getElementsByTagName("META");
var txt = "";
var i;
for (i = 0; i < x.length; i++) {
txt = txt + "Name of "+(i+1)+". meta tag: "+x[i].name+"<br>";
}
परिभाषा और उपयोग
नाम संपत्ति सामग्री विशेषता में जानकारी के लिए एक नाम सेट या लौटाती है।
नाम विशेषता का मान सामग्री विशेषता के मान पर निर्भर करता है।
WHATWG विकी मेटा एक्सटेंशन पृष्ठ में परिभाषित एक विस्तारित सूची भी है - कोई भी व्यक्ति किसी भी समय एक नया प्रकार जोड़ने के लिए पृष्ठ को संपादित करने के लिए स्वतंत्र है। कोई भी औपचारिक रूप से स्वीकार नहीं किया जाता है, लेकिन भविष्य में हो सकता है। अधिक जानकारी के लिए, WHATWG विकी मेटा एक्सटेंशन पृष्ठ पर जाएं ।
नोट: यदि http-equiv विशेषता सेट है, तो नाम विशेषता सेट नहीं की जानी चाहिए।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
नाम संपत्ति वापस करें:
metaObject.name
नाम संपत्ति सेट करें:
metaObject.name = "application-name|author|description|generator|keywords"
Value | Description |
---|---|
application-name | Specifies the name of the Web application that the page represents |
author | Specifies the name of the author of the document. Example: <meta name="author" content="Hege Refsnes"> |
description | Specifies a description of the page. Search engines can pick up this description to show with the results of searches. Example: <meta name="description" content="Free web tutorials"> |
generator | Specifies one of the software packages used to generate the document (not used on hand-authored pages) Example: <meta name="generator" content="FrontPage 4.0"> |
keywords | Specifies a comma-separated list of keywords - relevant to the page (Informs search engines what the page is about). Tip: Always specify keywords (needed by search engines to catalogize the page). Example: <meta name="keywords" content="HTML, meta tag, tag reference"> |
प्रतिलाभ की मात्रा
Type | Description |
---|---|
String | A name for the information in the content attribute |
❮ मेटा ऑब्जेक्ट