start learning
Image 1
32010265985

Meta Content Security Policy (CSP) tag

Role: Helps prevent cross-site scripting (XSS) and other code injection attacks.
Importance: Crucial for web security, indirectly affecting SEO by maintaining a secure and trustworthy site.



    <meta http-equiv="Content-Security-Policy" content="default-src 'self';">

Meta Content Security Policy (CSP) tag must be placed between the <head> and </head> as follow:


<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Security-Policy" content="default-src 'self';">
   <title>Sample Page</title>
</head>
<body>
      <!-- body content here -->
<footer>
        <!-- Footer content here -->
    </footer>
</body>
</html>
×