seniorHTML5

What is the 'Content Security Policy' (CSP) in HTML meta tags?

Updated Apr 28, 2026

Short answer

A security layer that helps detect and mitigate certain types of attacks, like XSS.

Deep explanation

CSP allows you to restrict which domains the browser should consider to be valid sources of executable scripts, images, etc. It can be set via HTTP headers or a <meta> tag.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More HTML5 interview questions

View all →