HTML content attribute
content
The purpose of the HTML content attribute is to specify the related information for a given meta key.
Supported elements
HTML content attribute supports meta element.
Syntax
<meta content="value">..............</meta>
Type of value
Character Data.
Value
A piece of text.
Default value
There is no default value.
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML content attribute with meta
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="description" content="content attribute example"/>
<meta name="keywords" content="HTML,Tutorial,content attribute,meta"/>
<title>Example of HTML content attribute with meta </title>
</head>
<body>
<p>This is an example of content attribute.</p>
</body>
</html>
Result
View this example in a separate browser window
Example of HTML content attribute with meta
Previous: HTML colspan attribute
Next: HTML coords attribute
Test your Programming skills with w3resource's quiz.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/html/attributes/html-content-attribute.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics