HTML DOM content Property
Complete Meta Object Reference
Definition and Usage
The content property sets or returns the value of the content attribute of a
<meta> element.
Syntax
Example
The following example has a <meta> tag that defines some keywords for search
engines. The script below returns the value of the content attribute:
<html>
<head>
<meta name="keywords" content="HTML,DHTML,CSS,JavaScript" />
</head>
<body>
<script type="text/javascript">
x=document.getElementsByTagName("meta")[0];
document.write("Meta content: " + x.content);
</script>
</body>
</html>
|
Try-It-Yourself Demos
Get the
value of the content attribute of a <meta> element
Complete Meta Object Reference
|