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 <video> Tag Tutorial

The <video> tag in HTML is used to embed a video into a web page. This tag allows you to define a video player on your website, and specify the video file to be played. The <video> tag also supports various attributes to customize the appearance and behavior of the video player.

How to Use the <video> Tag

To use the <video> tag, you need to specify the URL of the video file that you want to embed. Here's an example of how to embed a video file named "example.mp4":

<video src="example.mp4" controls>
  Your browser does not support the video tag.
</video>

In this example, the src attribute specifies the URL of the video file, and the controls attribute adds a set of playback controls to the video player.

Main Attributes of the <video> Tag

Attribute Description
src Specifies the URL of the video file to be played.
controls Adds a set of playback controls to the video player.
autoplay Specifies that the video should start playing automatically when the page loads.
loop Specifies that the video should start over again when it reaches the end.
poster Specifies an image to be shown while the video is downloading, or until the user hits the play button.

These are just a few of the attributes that can be used with the <video> tag. For a complete list of attributes and their descriptions, you can refer to the W3Schools website.

Now that you have learned how to use the <video> tag and its main attributes, you can start embedding videos into your web pages and customize the video player to suit your needs.