深度阅读

How to add audio in Markdown?

作者
作者
2023年08月22日
更新时间
8.6 分钟
阅读时间
0
阅读量

To add audio in Markdown, you can use the <audio> tag with the src attribute to specify the URL of the audio file. However, note that Markdown itself does not support the <audio> tag, so you would need to use an HTML tag directly within a Markdown file. Here’s an example:

<audio src="/path/to/audio.mp3" controls>
Your browser does not support the audio tag.
</audio>

This will display an audio player in the generated HTML. The controls attribute will include play, pause, and volume controls for the audio file. The Your browser does not support the audio tag. text will be displayed if the user’s browser does not support the <audio> tag.

Keep in mind that different Markdown rendering engines may handle HTML elements differently, so you might want to test this in your specific environment to ensure that it works as expected.

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。