Yes: you can hide the built-in browser UI (by removing the controls attribute from audio) and instead build your own interface and control the playback using Javascript (source):

<audio id="player" src="vincent.mp3"></audio>
<div> 
  <button onclick="document.getElementById('player').play()">Play</button> 
  <button onclick="document.getElementById('player').pause()">Pause</button> 
  <button onclick="document.getElementById('player').volume += 0.1">Vol +</button> 
  <button onclick="document.getElementById('player').volume -= 0.1">Vol -</button> 
</div>

You can then style the elements however you wish using CSS.

MDN HTMLAudioElement API reference

Answer from gilad905 on Stack Overflow
Top answer
1 of 15
143

Yes: you can hide the built-in browser UI (by removing the controls attribute from audio) and instead build your own interface and control the playback using Javascript (source):

<audio id="player" src="vincent.mp3"></audio>
<div> 
  <button onclick="document.getElementById('player').play()">Play</button> 
  <button onclick="document.getElementById('player').pause()">Pause</button> 
  <button onclick="document.getElementById('player').volume += 0.1">Vol +</button> 
  <button onclick="document.getElementById('player').volume -= 0.1">Vol -</button> 
</div>

You can then style the elements however you wish using CSS.

MDN HTMLAudioElement API reference

2 of 15
137
<audio>

audio::-webkit-media-controls-panel

audio::-webkit-media-controls-mute-button

audio::-webkit-media-controls-play-button

audio::-webkit-media-controls-timeline-container

audio::-webkit-media-controls-current-time-display

audio::-webkit-media-controls-time-remaining-display

audio::-webkit-media-controls-timeline

audio::-webkit-media-controls-volume-slider-container

audio::-webkit-media-controls-volume-slider

audio::-webkit-media-controls-seek-back-button

audio::-webkit-media-controls-seek-forward-button

audio::-webkit-media-controls-fullscreen-button

audio::-webkit-media-controls-rewind-button

audio::-webkit-media-controls-return-to-realtime-button

audio::-webkit-media-controls-toggle-closed-captions-button

REFERENCE: https://chromium.googlesource.com/chromium/blink/+/72fef91ac1ef679207f51def8133b336a6f6588f/Source/core/css/mediaControls.css?autodive=0%2F%2F%2F

🌐
W3Schools
w3schools.com › html › html5_audio.asp
HTML Audio
The controls attribute adds audio controls, like play, pause, and volume. The <source> element allows you to specify alternative audio files which the browser may choose from. The browser will use the first recognized format.
Discussions

Styling element - HTML & CSS - SitePoint Forums | Web Development & Design Community
How do I change the appearance of the element? When I access my web page on in Windows I see this… And when I access the same web page on my Mac I see this… As @coothead and @Ray.H were helping me in another thread, I’m not sure if I messed something up, or if the difference I see are ... More on sitepoint.com
🌐 sitepoint.com
0
December 27, 2019
Styling Audio Control - HTML & CSS - SitePoint Forums | Web Development & Design Community
I was able to use HTML5 to add a small audio clip to my client’s website. Woo hoo! Here is the code I added… Your browser does not support the audio element. The problem is that while the audio control looked fine in the middle of a blank page, when I add my audio clip to the left column ... More on sitepoint.com
🌐 sitepoint.com
0
April 21, 2015
Html 5 audio tag custom controls? - Stack Overflow
I feel like I'm taking crazy pills here because I can not figure out how to render the html 5 audio tag with custom controls. I have this html so far, and it works no problem: More on stackoverflow.com
🌐 stackoverflow.com
css - Style the audio html tag - Stack Overflow
You can't but you can make your own player and then style it any way you want: stackoverflow.com/questions/24367263/… ... This is possible! audio::-webkit-media-controls-panel { background-color: coral; } More on stackoverflow.com
🌐 stackoverflow.com
🌐
CSS-Tricks
css-tricks.com › lets-create-a-custom-audio-player
Let’s Create a Custom Audio Player | CSS-Tricks
February 18, 2021 - We even get to specify multiple files for better browser support, as well as a little CSS flexibility to style things up, like giving the audio player a border, some rounded corners, and maybe a little padding and margin.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › audio
The Embed Audio element - HTML - MDN Web Docs - Mozilla
The default controls have a display ... and layout, unless you want it to sit within a text block or similar. You can style the default controls with properties that affect the block as a single unit, so for example you can give it a border and border-radius, padding, margin, ...
🌐
SitePoint
sitepoint.com › html & css
Styling element - HTML & CSS - SitePoint Forums | Web Development & Design Community
December 27, 2019 - How do I change the appearance of the < audio > element? When I access my web page on in Windows I see this… And when I access the same web page on my Mac I see this… As @coothead and @Ray.H were helping me in ano…
🌐
W3Schools
w3schools.com › tags › att_audio_controls.asp
HTML audio controls Attribute
The controls attribute is a boolean attribute.When present, it specifies that audio controls should be displayed. ... The numbers in the table specify the first browser version that fully supports the attribute. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
🌐
Sololearn
sololearn.com › en › Discuss › 1175888 › can-someone-tell-me-how-to-style-audio-player-
Can someone tell me how to style audio player ? | Sololearn: Learn to code for FREE!
Luckily, other people have already done this. My favorite player right now is http://www.jplayer.org/, it is very stylable and works great. Check it out. ... You can style it with pure css.
Find elsewhere
🌐
SitePoint
sitepoint.com › html & css
Styling Audio Control - HTML & CSS - SitePoint Forums | Web Development & Design Community
April 21, 2015 - I was able to use HTML5 to add a small audio clip to my client’s website. Woo hoo! Here is the code I added… <audio controls> <source src="/audio/wolf.ogg" type="audio/ogg" /> <source src="/audio/wolf.mp3" typ…
🌐
HTML.com
html.com › attributes › audio-controls
<audio controls> HTML Attribute »
July 3, 2017 - --> </audio> <small>Audio by JCZA [<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a>] , via <a href="https://commons.wikimedia.org/wiki/File:JCZA_-_JCzarnecki-Flamenco.ogg">Wikimedia Commons</a></small> <style> .audio-example { display: block; } </style> You will see this text if native audio playback is not supported. Audio by Beeld en Geluid [CC BY-SA 3.0], via Wikimedia Commons · You will see this text if native audio playback is not supported. Audio by JCZA [CC BY-SA 3.0] , via Wikimedia Commons · Under most normal circumstances, including the controls attribute should be a matter of course.
🌐
DotFactory
dofactory.com › html › audio › style
HTML audio style
<audio id="myaudio" style="border:10px solid lightsalmon; border-radius: 50px;" controls> <source src="/media/epic.mp3" type="audio/mpeg"> <source src="/media/epic.wav" type="audio/wav"> </audio> <br/><br/> <button onclick="toggle();">Toggle style</button> <script> let toggle = () => { let element = document.getElementById("myaudio"); if (element.style.borderStyle === "solid") { element.style.borderStyle = "dashed"; } else { element.style.borderStyle = "solid"; } } </script> Try it live
🌐
Server Side Up
serversideup.net › blog › style-the-html-5-audio-element
Tutorial: How To Style the HTML 5 Audio Player | Server Side Up
October 21, 2012 - Master the art of customizing the HTML5 audio player with JavaScript and CSS. This tutorial walks you through building custom controls, styling the player UI, and enhancing the audio experience for modern web applications.
🌐
Perficient Blogs
blogs.perficient.com › 2017 › 12 › 19 › how to customize your own html5 audio player
How to Customize Your Own HTML5 Audio Player
December 19, 2017 - Finally, you can add the styles you like to make your play prettier. Below is the codepen link which has all the source codes on this blog. Feel free to take a look if you are interested. ... I hope you’ve enjoyed learning about HTML5 audio and how you can create your own players. There are only basic controls in my player, but there’s nothing to stop you from adding more features such as volume control, play mode and even adding your own animations.
🌐
CodePen
codepen.io › dcastanos › pen › BapxGM
HTML5 Audio CSS style
Minimize HTML Editor · Fold All · Unfold All · <audio controls preload="metadata"> <source src="https://www.w3schools.com/html/horse.ogg" type="audio/ogg"> </audio> ! CSS Options · Format CSS · View Compiled CSS · Analyze CSS · Maximize CSS Editor · Minimize CSS Editor ·
Top answer
1 of 4
49

You create your elements like so...

<audio id="yourAudio" preload='none'>
    <source src='the url to the audio' type='audio/wav' />
</audio>
<a href="#" id="audioControl">play!</a>

And add some functionality:

var yourAudio = document.getElementById('yourAudio'),
    ctrl = document.getElementById('audioControl');

ctrl.onclick = function () {

    // Update the Button
    var pause = ctrl.innerHTML === 'pause!';
    ctrl.innerHTML = pause ? 'play!' : 'pause!';

    // Update the Audio
    var method = pause ? 'pause' : 'play';
    yourAudio[method]();

    // Prevent Default Action
    return false;
};

Right now, the button is just simple text ("play!" or "pause!"), but you could do just about anything you wanted with CSS. Instead of setting the innerHTML, set the className and you're good to go!

2 of 4
13

After a lot of research, I found an easy way of eliminating and manipulating specific parts of the predefined controls.

Create your elements as you usually would, like so:

<audio autoPlay>
    <source src='audioUrl' type='audio/mpeg' />
</audio>

Then in the CSS file, you write the following:

/* Specifies the size of the audio container */
audio {
  width: 115px;
  height: 25px;
}

audio::-webkit-media-controls-panel {
  -webkit-justify-content: center;
  height: 25px;
}

/* Removes the timeline */
audio::-webkit-media-controls-timeline {
  display: none !important;
}

/* Removes the time stamp */
audio::-webkit-media-controls-current-time-display {
  display: none;
}
audio::-webkit-media-controls-time-remaining-display {
  display: none;
}

With this code, you should get a small and nice looking container with only mute-button, pause/play-button and the 'download-file'-tag.

For an overview of all the things you can modify, have a look here.

The following code will also remove the mute- and the play-button:

/* Removes mute-button */
audio::-webkit-media-controls-mute-button {
  display: none;
}

/* Removes play-button */
audio::-webkit-media-controls-play-button {
  display: none;
}
🌐
W3Schools
w3schools.com › tags › tag_audio.asp
HTML audio tag
<!--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <h1> - <h6> <head> <header> <hgroup> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <label> <legend> <li> <link> <main> <map> <mark> <menu> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-add-controls-to-an-audio-in-html5
How to add controls to an audio in HTML5 ? - GeeksforGeeks
July 23, 2025 - From the above Syntax controls attribute adds audio controls, like play, pause, and volume and the <source> element allows you to specify alternative audio files. The audio tag supports mainly 5 attributes as given below: autoplay : Makes the ...
🌐
Medium
medium.com › @sherry11913 › html-how-to-use-audio-elements-efficiently-c156bf118fa8
HTML — How to Use <audio> Tags Efficiently? | by Sherry Li | Medium
January 11, 2023 - You can style the default controls with properties that affect the block as a single unit, so for example you can give it a border and border-radius, padding, margin, etc. You can't however style the individual components inside the audio player ...
Top answer
1 of 2
10

This is possible!

audio::-webkit-media-controls-panel {
  background-color: coral;
}
 <li class="music">
   <div class="podcast">
     <div class="img-episodes-container">
       <img src="images/podcast1.jpg" alt="microfono">
     </div>
     <h4>Lorem, ipsum dolor.</h4>
     <audio controls>
       <source src="sounds/sound1.mp3">
     </audio>
   </div>
 </li>

Here is the full list:

audio::-webkit-media-controls-panel

audio::-webkit-media-controls-mute-button

audio::-webkit-media-controls-play-button

audio::-webkit-media-controls-timeline-container

audio::-webkit-media-controls-current-time-display

audio::-webkit-media-controls-time-remaining-display

audio::-webkit-media-controls-timeline

audio::-webkit-media-controls-volume-slider-container

audio::-webkit-media-controls-volume-slider

audio::-webkit-media-controls-seek-back-button

audio::-webkit-media-controls-seek-forward-button

audio::-webkit-media-controls-fullscreen-button

audio::-webkit-media-controls-rewind-button

audio::-webkit-media-controls-return-to-realtime-button

audio::-webkit-media-controls-toggle-closed-captions-button

As per this incomplete answer: Is it possible to style html5 audio tag?

Please note these are the Chrome / Webkit supported tags. There may or may not be Firefox / IE11 supported tags for the audio element as there is little-to-no documentation on -moz or -ms prefixing conventions/support for this tag.

2 of 2
1

You can Style the audio Tag as the answer above mentioned, but the issue is it will not have support on most of the browsers which might cause your application for not having cross browser compatibility, I suggest you to design a custom player and make functionality like the audio tag , it will more feasible for you.

🌐
GeeksforGeeks
geeksforgeeks.org › html › html-audio-controls-attribute
HTML | <audio> controls Attribute - GeeksforGeeks
July 15, 2022 - <!DOCTYPE html> <html> <head> <title> HTML Audio controls Attribute </title> </head> <body style="text-align: center"> <h1 style="color: green"> GeeksforGeeks </h1> <h2 style="font-family: Impact"> HTML Audio controls Attribute </h2> <br> <audio id="Test_Audio" controls> <source src= "https://media.geeksforgeeks.org/wp-content/uploads/20190531165842/Recording1514.ogg" type="audio/ogg"> <source src= "https://media.geeksforgeeks.org/wp-content/uploads/20190531165842/Recording1514.mp3" type="audio/mpeg"> </audio> </body> </html> Output: Supported Browsers: The browser supported by HTML <audio> controls attribute are listed below: Google Chrome 3.0 and above ·
🌐
GitHub
gist.github.com › 43c970b72a70badbd2a3
Styles for HTML5 audio - Gist - GitHub
Styles for HTML5 audio. GitHub Gist: instantly share code, notes, and snippets.