Quick answer

Inline scripts are valid but can trigger CSP or validation warnings.

HTML Inline Script

Inline scripts are valid but can trigger CSP or validation warnings. External scripts are easier to cache and maintain.

Common causes

How to fix

FAQ

Inline script valid?
Yes.
CSP?
Use nonce or hash.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical