<svelte:head> chapter

pull/2132/head
Richard Harris 7 years ago
parent 57d5d67ebe
commit fd2b3e4daf

@ -0,0 +1,5 @@
<svelte:head>
<!-- elements go here -->
</svelte:head>
<h1>Hello world!</h1>

@ -0,0 +1,5 @@
<svelte:head>
<link rel="stylesheet" href="tutorial/dark-theme.css">
</svelte:head>
<h1>Hello world!</h1>

@ -0,0 +1,13 @@
---
title: <svelte:head>
---
Lastly, `<svelte:head>` allows you to insert elements inside the `<head>` of your document:
```html
<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.

@ -148,7 +148,7 @@ Maybe lifecycle should go first, since we're using `onMount` in the `this` demo?
* [x] `<svelte:component>`
* [x] `<svelte:window>`
* [x] `<svelte:body>`
* [ ] `<svelte:head>`
* [x] `<svelte:head>`
## Miscellaneous

@ -0,0 +1,5 @@
body {
background-color: #333;
color: whitesmoke;
transition: all 0.5s;
}
Loading…
Cancel
Save