Advanced
Head
Learn how to include elements in the head of your document.
You can include elements into the <head>
element of your application with <svelte:head>
component. This is useful for adding meta tags, styles, and scripts to your document.
You can use the <svelte:head>
component in any view, it will automatically add the elements to the <head>
of the document.
Here’s an example:
<svelte:head>
<title>My Page</title>
<meta name="description" content="This is my page" />
<link rel="stylesheet" href="styles.css" />
<script src="script.js"></script>
</svelte:head>
<View>
...
</View>