11ºANO » Desenvolvimento de páginas WEB estáticas » ÁUDIO  


Há duas maneiras de inserir som em uma página:

<EMBED SRC="audio.som"> insere o arquivo de som como objecto.

<BGSOUND SRC="audio.som"> faz com que o som seja inserido como som de fundo ou 'trilha sonora' de uma página. Esta formatação só funciona no Internet Explorer.

Essas formatações, porém, não farão efeito algum quando o browser não estiver configurado para "executar" o arquivo de som por meio de um plug-in adequado, ou se o computador em que estiver carregada a página não tiver instalada uma placa de som.

 

Download Free Wav Sounds: http://www.wav-sounds.com/index.html

Download free Midi Sounds : http://www.midisite.co.uk/

 

Exemplo 1:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>You GOT MAIL</title>
</head>

<body topmargin="100">
<table align="center">
<tr>
<td bgcolor="#CC33FF" width="50">&nbsp;</td>
<td><table align="center" bgcolor="#FFFFFF">
<tr><td align="center" valign="middle"><font face="Microsoft Sans Serif" color="#CC33CC" size="+4" style="font-weight:100">YOU GOT MAIL</font></td></tr><tr><td align="center"><img src="imagens/mail.jpg"></td></tr><tr><td align="center" valign="top" height="30" ><embed src="wav_sounds/mail.wav" autostart="false" loop="true" height="30"></td></tr>
</table></td>
<td bgcolor="#9933FF" width="50">&nbsp;</td>
</tr>
</table>
</body>
</html>

 

Exemplo 2 - som de fundo no Internet Explorer:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SOM DE FUNDO</title>
</head>

<body>
<p>
<bgsound src="stop_loving_you.mid"/>
<img src="imagens/valentin_red_heart.png">
</p>
</body>
</html>

 

Exemplo 3 - som de fundo no Mozilla Firefox:

 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SOM DE FUNDO</title>
</head>

<body>
<p>
<embed src="wav_sounds/stop_loving_you.mid" autostart="true" loop="true" hidden="true"/>
<img src="imagens/valentin_red_heart.png">
</p>
</body>
</html>

 

+ informação em:

http://www.ufpa.br/dicas/htm/htm-som1.htm