Skip to content

Commit 8170d4f

Browse files
committed
add docs
1 parent e3e3ad9 commit 8170d4f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

site/content/docs/02-template-syntax.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,27 @@ Text can also contain JavaScript expressions:
111111
```
112112

113113

114+
### Comments
115+
116+
---
117+
118+
You can use HTML comments inside components.
119+
120+
```html
121+
<!-- this is a comment! -->
122+
<h1>Hello world</h1>
123+
```
124+
125+
---
126+
127+
Comments beginning with `svelte-ignore` disable warnings for the next block of markup. Usually these are accessibility warnings; make sure that you're disabling them for a good reason.
128+
129+
```html
130+
<!-- svelte-ignore a11y-autofocus -->
131+
<input bind:value={name} autofocus>
132+
```
133+
134+
114135
### {#if ...}
115136

116137
```sv

0 commit comments

Comments
 (0)