<h1></h1>
<p></p>
h是標簽從h1~h6,沒用h7,h8
p是段落
<a href="https://www.educoder.net">Educoder平臺</a>
href可以指定鏈接進行跳轉
<img src="https://www.educoder.net/attachments/download/207801" alt="小狗走路"/>
src是指圖片地址,alt是未加載出來的時候顯示的文字
<div align="center"><img src="./iTunesArtwork@2x.png" align="bottom" width="50" height="50" alt="50*50 應用圖標"><img src="./iTunesArtwork@2x.png" width="100" height="100" alt="100*100 應用圖標"><img src="./iTunesArtwork@2x.png" width="200" height="200" alt="200*200 應用圖標"></div>
div中可以指定align信息,img也可以
提供一段代碼
<!DOCTYPE html><head><meta charset="UTF-8" /><title>HTML - 音頻</title>
</head><body><h1 align="center">青石巷</h1><br><div align="center"><audio controls="controls" autoplay="autoplay" loop="loop" height="100" width="100"><source src="https://www.educoder.net/api/attachments/171686" type="audio/wav"/><source src="https://www.educoder.net/api/attachments/171685" type="audio/ogg"/><source src="https://data.educoder.net/api/attachments/171679" type="audio/mp3"/><embed width="100" height="100">你的瀏覽器不支持該音頻格式。 Your browser does not support this audio format.</audio></div><br><p align="center" style="color:grey;">HTML5 audio 播放示例</p><p align="center" style="color:grey;"><small>注意:音頻控件顯示效果在不同瀏覽器中有些許差別。</small></p>
</body>
其中autoplay是頁面加載出來就播放,loop是指播放完了重新播放
wav,ogg,mp3是音頻的三種方式可以進行嘗試播放如果不能成功就會嘗試<embed>
接下來給出播放視頻的代碼
<!DOCTYPE html><head><meta charset="UTF-8" /><title>HTML - 視頻</title>
</head><body> <h1 align="center">揚帆起航</h1><video width="550" control="control" autoplay loop><source src="./video/Sail-Away.mp4" type="video/mp4" /><source src="./video/Sail-Away.ogv" type="video/ogv" /><source src="./video/Sail-Away.webm" type="video/webm"/><object data="./video/Sail-Away.mp4" width="320" height="240"><embed src="./video/Sail-Away.swf" width="320" height="240" />你的瀏覽器不支持該視頻格式。Your browser does not support this video format.</object></video><br><p align="center" style="color:grey;">HTML5 video 播放示例</p><p align="center" style="color:grey;"><small>注意:視頻控件顯示效果在不同瀏覽器中有些許差別。</small></p>
</div>
</body>