Skip to main content

HTML Guide

Bad value “expires” for attribute “http-equiv” on element “meta”.

The http-equiv attribute in the <meta> element is used to provide certain types of information to browsers. The allowed values for http-equiv are predefined and restricted by the HTML specification.

The error “Bad value “expires” for attribute “http-equiv” on element “meta”” is due to using an unrecognized or deprecated value for http-equiv. As of current HTML standards, the acceptable values for http-equiv include:

  • content-language
  • content-type
  • default-style
  • refresh
  • set-cookie (deprecated in HTML5 and not considered conformance)

The expires value is not included in these predefined values. Historically, it was used in older versions to provide expiration details for cached content, but this is no longer part of the specification for http-equiv.

If the intention is to control caching behavior, handle this at the server level by setting HTTP headers like Cache-Control and Expires.

Learn more:

Related W3C validator issues