About This HTML Issue
The <meta> element is used to provide machine-readable metadata about an HTML document, such as its description, character encoding, viewport settings, or social media information. The HTML specification defines several valid forms for <meta>, and most of them require a content attribute to supply the metadata’s value.
This error typically appears when a <meta> tag includes a name or http-equiv attribute but is missing the corresponding content attribute. It can also appear when a <meta> tag has no recognizable attributes at all, or when the property attribute (used by Open Graph / RDFa metadata) is present without content.
A <meta> element must use one of these valid attribute patterns:
-
name+content— Named metadata (e.g., description, author, viewport) -
http-equiv+content— Pragma directives (e.g., refresh, content-type) -
charset— Character encoding declaration (nocontentneeded) -
property+content— RDFa/Open Graph metadata (e.g.,og:title) -
itemprop+content— Microdata metadata
Without the proper combination, browsers and search engines cannot correctly interpret the metadata, which can hurt SEO, accessibility, and proper page rendering. For example, a <meta name="description"> tag without content provides no description to search engines, and a <meta name="viewport"> without content won’t configure the viewport on mobile devices.
Examples
❌ Missing content attribute
<head>
<meta charset="utf-8">
<title>My Page</title>
<meta name="description">
<meta name="viewport">
</head>
Both <meta> tags with name are missing their required content attribute.
❌ Empty or bare <meta> tag
<head>
<meta charset="utf-8">
<title>My Page</title>
<meta>
</head>
A <meta> element with no attributes at all is invalid.
❌ Open Graph tag missing content
<head>
<meta charset="utf-8">
<title>My Page</title>
<meta property="og:title">
</head>
✅ Correct usage with name and content
<head>
<meta charset="utf-8">
<title>My Page</title>
<meta name="description" content="A brief description of the page">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
✅ Correct usage with http-equiv and content
<meta http-equiv="refresh" content="30">
✅ Correct usage with Open Graph property and content
<meta property="og:title" content="My Page Title">
<meta property="og:description" content="A description for social sharing">
✅ Correct charset declaration (no content needed)
<meta charset="utf-8">
The charset form is the one exception where content is not required, because the character encoding is specified directly in the charset attribute value.
How to fix
-
Find the flagged
<meta>tag in your HTML source at the line number reported by the validator. -
Determine what type of metadata it represents. Does it have a
name,http-equiv, orpropertyattribute? -
Add the missing
contentattribute with an appropriate value. If you intended the metadata to be empty, usecontent="", though it’s generally better to either provide a meaningful value or remove the tag entirely. -
If the
<meta>tag has no attributes at all, decide what metadata you intended to provide and add the correct attribute combination, or remove the element.
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.