HTML Basics

HTML Introduction HTML Basic HTML Comments HTML Tags/Elements HTML Attributes HTML Formatting HTML Block and Inline HTML Charsets HTML Classes HTML Colors HTML Div HTML Headings HTML Id HTML Iframes HTML Images HTML File Paths HTML Tables HTML Layout HTML Lists HTML Links <a> HTML Paragraphs HTML Quotations HTML JavaScript HTML Emojis HTML URL Encode HTML Entities HTML Computercode HTML Symbols HTML Styles

HTML Forms

HTML Forms HTML Form Elements HTML Form Attributes HTML Input Attributes HTML Input Regex HTML Input Form Attributes HTML Input Types

HTML SEO

HTML Head HTML Page Title HTML Responsive HTML Semantics HTML Favicon

HTML Graphics

HTML Canvas HTML SVG

HTML Media

HTML Media HTML Audio HTML Video

HTML Reference

a abbr acronym address applet area article aside audio b base basefont bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl DOCTYPE dt em embed fieldset figcaption figure font footer form frame frameset h1_-_h6 head header hgroup hr html i iframe img input ins kbd label legend li link main map mark menu meta meter nav noframes noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr

HTML Media Tutorial

Welcome to our HTML media tutorial! In this tutorial, we will learn how to add different types of media, such as images, audio, and video, to our web pages using HTML.

Images

Images are a great way to make your website visually appealing. To add an image to your web page, you can use the <img> tag. The <img> tag is an empty tag, which means it does not have a closing tag. Here's an example:

<img src="image.jpg" alt="Description of the image">

The src attribute specifies the URL of the image file, and the alt attribute provides a text description of the image. This is important for accessibility and SEO purposes.

Audio

If you want to add audio to your web page, you can use the <audio> tag. Here's an example:

<audio controls>
  <source src="audio.mp3" type="audio/mpeg">
  Your browser does not support the audio tag.
</audio>

The controls attribute adds audio controls, such as play, pause, and volume. The <source> tag specifies the audio file and its type.

Video

To add video to your web page, you can use the <video> tag. Here's an example:

<video controls width="400" height="300">
  <source src="video.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

Similar to the <audio> tag, the <video> tag allows you to specify the video file and its type. The controls attribute adds video controls, and you can also set the width and height of the video player.

Conclusion

That's it for our HTML media tutorial! Now you know how to add images, audio, and video to your web pages using HTML. Experiment with different media types and have fun creating engaging content for your website!