Adding Videos to Your Website
September 20, 2024
In this tutorial, I'll demonstrate how to add videos to your website, focusing on YouTube integration. I'll show the simplest method first, followed by a more advanced option for greater control.
And here is the code you'll want to use for Method 2, shown in the video:
<!— Replace this with the iFrame embed code from YouTube —>
<style>
.youtube-video, .vimeo-video {
display: block;
aspect-ratio: 16 / 9;
width: 100%;
max-width: 800px;
margin: 1.5rem auto;
}
</style>