VOOZH about

URL: https://www.geeksforgeeks.org/html/html-loop-attribute/

⇱ HTML loop Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML loop Attribute

Last Updated : 29 May, 2026

The HTML loop attribute is used to make media replay automatically after it finishes. It is commonly applied to audio and video elements for continuous playback.

  • Repeats media playback automatically when it ends.
  • Can be used with both <audio> and <video> elements.
  • Often combined with attributes like autoplay, muted, and controls.

Syntax: 

<element loop>

Supported Elements

  • <audio>
  • <video>
  • <marquee>
  • <bgsound>


Example 1: Illustrates the use of loop attribute in <audio> element.  


Example 2: Illustrates the use of loop attribute in <video> element.  

Comment
Article Tags: