--- title: {@html ...} --- To inject raw HTML into your component, use the `{@html ...}` tag: ```svelte
{@html content}
``` > [!NOTE] Make sure that you either escape the passed string or only populate it with values that are under your control in order to prevent [XSS attacks](https://owasp.org/www-community/attacks/xss/). Never render unsanitized content. The expression should be valid standalone HTML — this will not work, because `` is not valid HTML: ```svelte {@html '
'}content{@html '
'} ``` It also will not compile Svelte code. ## Styling Content rendered this way is 'invisible' to Svelte and as such will not receive [scoped styles](scoped-styles) — in other words, this will not work, and the `a` and `img` styles will be regarded as unused: ```svelte
{@html content}
``` Instead, use the `:global` modifier to target everything inside the `
`: ```svelte ```