HTML content attribute

content attribute specifies a value for the meta data such as keywords, description and author name etc.

Example

<!DOCTYPE html>
<html>
<head>
 <title>Here title is written</title>
 <meta name="keywords" content="comma separated keywords are written">
</head>
<body>
 <p>head contains meta data. It also contains title of page, links for external stylesheet, links for external js files etc.</p>
</body>
</html>
Try </>

content attribute values

For application:

For an application, the value of the content attribute is the name of the web application.

<title>Here title is written</title>
<meta name="application" content="the name of web application">

If the page is not a web application, then this attribute should not be used.

For keywords:

For keywords, the value of the content attribute is the keywords separated by a comma. The keywords should be relevant to the page.

<meta name="keywords" content="comma separated keywords are written">

For description:

For description, the value is a simple string. This string is relevant to the document or page.

<meta name="description" content="A brief summary of the page">

For author:

The value of content attribute contains the name of the author of a website.

<meta name="author" content="the name of author">

Related Tags

The tags which support this attribute are as follows.

<meta> tag

meta tag represents the meta information about the page for SEO (search engine optimization).

All the meta tags are taken as the child of head element.

Related Pages

Visit meta tag for more information.



Was this article helpful?

 

Email:

Message:

Get the newsletter