HTML 5 audio tags can be styled. Use the default browser player by using the audio tag with the "controls" attribute. You can customize it without using browser controls.
You can hide the built-in browser user interface by removing the controls attribute −
<audioid = "player" src = "kalimba.mp3"></audio> <div> <buttononclick = "document.getElementById('player').play()">Play</button> <buttononclick = "document.getElementById('player').pause()">Pause</button> <buttononclick = "document.getElementById('player').volume += 0.2">Vol+</button> <buttononclick = "document.getElementById('player').volume -= 0.2">Vol-</button> </div>
You can also add CSS classes to each element and proceed accordingly Style settings.
The above is the detailed content of Is it possible to style HTML5 audio tags?. For more information, please follow other related articles on the PHP Chinese website!