Skip to main content

Part 3 / Special elements / <svelte:head>

The <svelte:head> element allows you to insert elements inside the <head> of your document:

App.svelte
<svelte:head>
	<link rel="stylesheet" href="tutorial/dark-theme.css">
</svelte:head>

In server-side rendering (SSR) mode, contents of <svelte:head> are returned separately from the rest of your HTML.

Next: <svelte:options>

1
2
3
4
5
6
<svelte:head>
	<!-- elements go here -->
</svelte:head>
 
<h1>Hello world!</h1>
 
initialising