HTML content attribute


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.


<meta content="value">..............</meta>

Type of value

Character Data.


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">
<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>
<p>This is an example of content attribute.</p>


html content attribute with meta

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.

Follow us on Facebook and Twitter for latest update.

We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook