How does the http-equiv attribute in the <meta> element function?

The http-equiv attribute provides HTTP header-like information to the browser.

It acts as a pragma directive, allowing the <meta> element to convey information equivalent to HTTP headers. This can include directives like content-type, refresh, and content-security-policy, which help control the document's behavior and security policies.

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="refresh" content="5;url=https://example.com">
<meta http-equiv="content-security-policy" content="default-src 'self'">
<meta http-equiv="x-ua-compatible" content="IE=edge">
More cards24
Show all