HTML&CSS Learning Notes 2 (Additional)

来源:互联网 发布:十面埋伏音乐知乎 编辑:程序博客网 时间:2024/06/11 08:09

Additional Knowledges

& and " <>
For displaying original tags, &amp = &, &quot = ", &lt; = < and &gt; = >

<img src="URL" alt="NAME of Image">
Image has two values until now..

<code></code> and <pre></pre>
For displaying computer source code or the content which all of computers can read. The style of font like Courier, shortly, <code>tags display source code style screen. But for the <pre> tags, the difference is that it can keep the style of space and return firstly, and second is that the content is like String, you have to use transferred meaning characters. Like below,

<code>
You can directly see < and >
</code>

<pre>
You have to use &lt; and &gt; to see < and >.
</pre>

Video or Audio

<video></video>
Embedding the no video by using this two tags.

<video src="URL"><video>
Embedding the video without any control mechanisms.

<video src="URL" ATTRIBUTES ><video>

Attributes:

  • controls : Displays the standard HTML5 controls for the audio on the web page.
  • autoplay : Makes the audio play automatically.
  • loop : Make the audio repeat (loop) automatically.
  • preload : attribute is used in the audio element for buffering large files with three values,
    • ”none” does not buffer the file
    • “auto” buffers the media file
    • “metadata” buffers only the metadata for the file.

<video><source></video>
For matching different formats or multiple sources, < source> is good to work.

<source src="URL" type="video/[FORMATs] codecs=dirac, speex">
Diffrent formats supported by browsers are different, like
Video: ogg, mp4, webm
Audio: ogg, webm, mp3, wave, wav, x-wav, x-pn-wav

Reference from :
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video

0 0
原创粉丝点击