html tutorial - controls Attribute in HTML - html5 - html code - html form

controls attribute in html

Learn html - html tutorial - controls attribute in html - html examples - html programs

  • The controls attribute defines which audio/video controls should be visible.
  • This attribute is a Boolean attribute.
    • Full screen toggle (for video only)
    • Subtitles (for video only)
    • Track
    • Pause
    • Seeking
    • Play
    • Volume

Syntax for controls attribute in HTML:

<video controls >

Differences between HTML 4.01 and HTML5 for controls attribute:

HTML 4.01

  • The <video> and <audio> tag has not been defined.


  • The <video> and <audio> tag is added.

Applies To:

Element Attribute
<audio> contols
<video> contols

Sample Coding for controls Attribute in HTML:

Tryit<!DOCTYPE html>
        <title>Wikitechy controls attribute</title>
        <video width="300" height="300" controls>
        <source src="hibiscus.mp4" type="video/mp4">

Code Explanation for controls Attribute in HTML:

controls Attribute Code Explanation

  1. <video> tag is used to embed a video.
  2. controls attribute used to enable the video controls.
  3. <source> tag, used to specify the URL of video file.
  4. src attribute used to specifies the URL of the media file
  5. typeattribute used to specify the type of the media and its codec type.

Output for controls Attribute in HTML:

contols Attribute Tag Output

  1. The output shows the video with its controls.

Browser Support for controls Attribute in HTML:

4.0 9.0 3.5 4.0 10.5

Related Searches to controls Attribute in html