html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>Embedding YouTube Videos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!--
Here is an example of a video with
embedding enabled by the publisher.
-->
<h1>Embedding YouTube Videos</h1>
<p>Please review:</p>
<a href="https://www.sololearn.com/learn/338/?ref=app">HTML Embedding YouTube Videos</a>
<br><br>
<iframe width="560" height="315" src="https://www.youtube.com/embed/TMKUqDgLUKA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p>Remember that when you embed YouTube videos in your website, you are agreeing to abide by their terms:
<br><br>
<a href="https://developers.google.com/youtube/terms/api-services-terms-of-service">YouTube API Terms of Service</a>
<br><br>
Here are some technical details:
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
/* Unrelated to embedding YouTube videos */
iframe { width: 100%; }
a { margin: 2em; }
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run