How To Insert Music From Html

Table of contents:

How To Insert Music From Html
How To Insert Music From Html

Video: How To Insert Music From Html

Video: How To Insert Music From Html
Video: How to Add Audio in HTML using Notepad text Editor 2024, May
Anonim

HTML is a web page markup language that displays content in a browser. Using the language, you can also insert various multimedia objects, set background music and play any media files.

How to insert music from html
How to insert music from html

Instructions

Step 1

A descriptor can be used to create background music on a page, which can be included in any part of the page. However, webmasters usually insert this tag into service information between documents:

Step 2

When the page is fully loaded, the song.mp3 file will start playing in the same directory as the HTML file being edited. Files of resolution wav, mp3 or midi can be used for playback. The loop parameter is responsible for the number of repetitions of the melody and can take various numerical values. To enable continuous repeat playback, enter loop = “-1”. To decrease the volume, use the volume setting, which can take various values from -10000 to 0.

Step 3

Use the tag to embed the audio player into the page content. For example, to enable a melody named song.mp3, the following code will be used:

In this descriptor, the width and height parameters are responsible for the width and length of the displayed player, and autostart - for the start of automatic playback when the page finishes loading. The autostart setting can be false and true, which respectively disable or enable autoplay.

Recommended: