# Element “meta” is missing one or more of the following attributes: “content”, “property”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/element-meta-is-missing-one-or-more-of-the-following-attributes-content-property
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

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 (no `content` needed)
- **`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

```html
<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

```html
<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`

```html
<head>
  <meta charset="utf-8">
  <title>My Page</title>
  <meta property="og:title">
</head>
```

### ✅ Correct usage with `name` and `content`

```html
<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`

```html
<meta http-equiv="refresh" content="30">
```

### ✅ Correct usage with Open Graph `property` and `content`

```html
<meta property="og:title" content="My Page Title">
<meta property="og:description" content="A description for social sharing">
```

### ✅ Correct `charset` declaration (no `content` needed)

```html
<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

1. **Find the flagged `<meta>` tag** in your HTML source at the line number reported by the validator.
2. **Determine what type of metadata it represents.** Does it have a `name`, `http-equiv`, or `property` attribute?
3. **Add the missing `content` attribute** with an appropriate value. If you intended the metadata to be empty, use `content=""`, though it's generally better to either provide a meaningful value or remove the tag entirely.
4. **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.
