Your page uses inline event handlers (like `onclick="..."` in HTML). While functional, these can be a security risk as they're harder to protect with Content Security Policy and can be more easily exploited in XSS attacks. Modern best practices recommend using event listeners instead.
<button onclick="alert('Hello!')">Click me</button>
Move the event handling code to a separate script and use `addEventListener()` to attach the event handler.
<button id="myButton">Click me</button>
<script>
document.getElementById('myButton').addEventListener('click', function() {
alert('Hello!');
});
</script>
Using `addEventListener()` is more secure and allows you to implement a stricter Content Security Policy without `'unsafe-inline'`, providing better protection against XSS attacks.
This issue can affect your site's search engine rankings and user experience. Addressing it promptly helps ensure optimal performance and visibility in search results.
Black SEO Analyzer automatically checks for this warning during site analysis, along with hundreds of other technical SEO issues.
Choose the license that fits your needs and start getting the deep, actionable insights you deserve.