Mono_Pic Trust & Quality
English     Urdu

Lesson 9, Video, Audio & Maps: add multimedia to your site

Lesson 9: Audio, Video & Embedded Content

Goal: Add multimedia and external content.

html

<video src="intro.mp4" controls width="500">
    Your browser does not support video.
</video>
 
<audio src="sound.mp3" controls>
    Your browser does not support audio.
</audio>
 
<iframe width="560" height="315"
        src="https://www.youtube.com/embed/VIDEO_ID"
        title="Video title"
        allowfullscreen></iframe>

For Google Maps: Share → Embed a map → copy the <iframe> code.

Attribute

Purpose

controls

Shows play/pause buttons

autoplay

Plays automatically (users usually dislike this)

loop

Repeats

poster="img.jpg"

Preview image before the video plays

Extras:

  • Favicon: <link rel="icon" href="favicon.png">
  • Special characters: &copy; (©), &amp; (&)