- Attribute of
- <meta> HTML Tag
- What does
- Provides a context for the value in the contents attribute of a <meta> element.
name attribute of the
meta element defines the context of the
content attribute. This is best demonstrated with an example:
<meta name="description" content="The website for flamingo fans all over the world."> <meta name="keywords" content="flamingos, birds, american flamingo, beta carotene, pink plumage"> <meta name="author" content="Claire Broadley">
If we define a
author, we can then use the
content attribute to specify the author's name. Likewise, if we define the
name attribute as
content becomes a container for the page title.
In the past, it was possible to guide most search engines by specifying keywords in the
meta element. However, this feature was abused by spammy sites that used
meta keywords to manipulate their rankings. As such, many search engines now disregard keyword data specified in the
meta element. Those that do not completely disregard meta keywords may not place huge emphasis on them. There are some exceptions to this rule, so it's best to specify keywords, ensuring they are relevant (and not spammy).
The description specified in the
meta element will normally be used as the page title in search results pages, and in the browser window. Note that some scripts will override the value you set in the code; SEO plugins often provide this option. If you don't specify a
meta description, search engines will automatically create a description using words from the content of your page.