Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

HTML YouTube

Struggling with Video Formats?

Converting videos to various formats can be challenging and time-consuming.

A more convenient approach is to embed YouTube videos directly on your web page for playback.

YouTube Video

When you save or play a video on YouTube, it displays an ID (like tgbNymZ7vqY) that you can use to reference your video in HTML code.

Playing a YouTube Video in HTML

To play your video on a web page, follow these steps:

  1. Upload the video to YouTube.
  2. Note down the video ID.
  3. Define an <iframe> element in your web page.
  4. Set the src attribute to point to the video URL.
  5. Use the width and height attributes to specify the dimensions of the player.
  6. Optionally, add any other parameters to the URL as needed (see below).

Example

<iframe width=”420″ height=”315″
src=”https://www.youtube.com/embed/tgbNymZ7vqY”
>

</iframe>