Skip to content

Propagate Svelte Data

October 29th, 2021 - developmentwebit(1 min)

I’ve had to add a couple of links to youtube to my blog. I’ve seen a number of ways to add youtube links, ranging from simple HTML links to iframe tags.

I’ve settled for a simple approach: a linked a static image:

[![title](http://img.youtube.com/vi/YOUTUBE-ID/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE-ID 'title')

Nice that youtube also has the static image :)

The HTML would be something similar to:

<a href="http://www.youtube.com/watch?v=YOUTUBE-ID" title="title">
  <img src="http://img.youtube.com/vi/YOUTUBE-ID/0.jpg" alt="title" />
</a>
Share on

A little experiment: