Skip to main content

<svelte:head>

<svelte:head>...</svelte:head>

この要素を使用すると、document.head 内に要素を挿入できます。サーバーサイドレンダリング時には、head の内容は body の主要なコンテンツとは別に出力されます。

<svelte:window><svelte:document><svelte:body> と同様に、この要素はコンポーネントのトップレベルにのみ配置でき、ブロックや他の要素の中に含めることはできません。

<svelte:head>
	<title>Hello world!</title>
	<meta name="description" content="This is where the description goes for SEO" />
</svelte:head>

Edit this page on GitHub