Skip to content

Commit 3385803

Browse files
authored
[docs] Dynamic Attributes example: make example HTML consistent (#140)
1 parent deebd40 commit 3385803

File tree

1 file changed

+2
-2
lines changed
  • content/tutorial/01-svelte/01-introduction/03-dynamic-attributes

1 file changed

+2
-2
lines changed

content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When building web apps, it's important to make sure that they're _accessible_ to
1919
In this case, we're missing the `alt` attribute that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one:
2020

2121
```svelte
22-
<img src={src} +++alt="A man dances."+++>
22+
<img src={src} +++alt="A man dances."+++ />
2323
```
2424

2525
We can use curly braces _inside_ attributes. Try changing it to `"{name} dances."` — remember to declare a `name` variable in the `<script>` block.
@@ -29,5 +29,5 @@ We can use curly braces _inside_ attributes. Try changing it to `"{name} dances.
2929
It's not uncommon to have an attribute where the name and value are the same, like `src={src}`. Svelte gives us a convenient shorthand for these cases:
3030

3131
```svelte
32-
<img +++{src}+++ alt="A man dances.">
32+
<img +++{src}+++ alt="A man dances." />
3333
```

0 commit comments

Comments
 (0)