问:我输入的代码:
<audio> <source src =“ http://treehouse-code-samples.s3.amazonaws.com/html-video-and- audio / bridge-audio.mp3”> </ audio>
这个“ src”元素如何输入错误?
index.html
<!DOCTYPE html>
< html >
< head > < meta charset = “ utf-8” > < meta name = “ viewport” content = “ width = device-width,initial-scale = 1.0” > < title > HTML视频和音频</ title > < link rel = “ stylesheet” href = “ normalize.css” > < link href = 'http: //fonts.googleapis.com/css?family = Nunito:400300'的rel =
'样式表' 类型= '文本/样式表' >
<链路相对= “样式表” HREF = “的main.css” > </头> <体> < H1 > HTML视频和音频</ H1 > < DIV类= “包装“ > <音频> <源src = ” http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge-audio.mp3“ > </音频>
<!-在此行下面添加您的代码->
</ div > </ body > </ html >
答:在客观课程中需要进行更正。只需将更source改为即可audio。
使用: <audio src="http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge-audio.mp3">
代替: <source src="http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge-audio.mp3">