It just doesnt play and the audio is named mario-maker-start.wav
and the start button image is named start-btn.png
`Style.css:`
`.start-btn {
width: 200px;
height: 50px;
color: #ffffff;
background: url('../images/start-btn.png');
position: absolute;
bottom: 100px;
left: 252px;
border: 2px solid black;}`
`Index.html:`
`<audio id="start" src="sounds/mario-maker-start.wav"></audio>
<button id=".start-btn">play</button>
<script>
var start = document.getElementById(".start-btn");
function playSound() {
start.play();}
startBtn.onclick = playSound;
</script>
</body>
</html>`
New contributor
misak108 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.