如何在 HTML5 網頁中嵌入音訊?
在 HTML5 中,使用 <audio> 標籤可以向網頁中嵌入音訊。您可以嘗試執行以下程式碼來實現 <audio> 標籤 −
示例
<!DOCTYPE html> <html> <head> <title>HTML audio Tag</title> </head> <body> <p>Click on Play button...</p> <p>(Song: Kalimba which is provided as a Sample Music in Windows)</p> <audio controls> <source src = "/html/Kalimba.mp3" type = "audio/mpeg"> </audio> </body> </html>
廣告