Home > Web Front-end > HTML Tutorial > Is it possible to style HTML5 audio tags?

Is it possible to style HTML5 audio tags?

WBOY
Release: 2023-09-21 10:49:03
forward
737 people have browsed it

Is it possible to style HTML5 audio tags?

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(&#39;player&#39;).play()">Play</button>
   <buttononclick = "document.getElementById(&#39;player&#39;).pause()">Pause</button>
   <buttononclick = "document.getElementById(&#39;player&#39;).volume += 0.2">Vol+</button>
   <buttononclick = "document.getElementById(&#39;player&#39;).volume -= 0.2">Vol-</button>
</div>
Copy after login

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!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template