1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
H O M E
  CSS Quiz

 

Some other time...

  Assignment II

Some things that came up

 

When linking to another site outside your own, it's always best to use the target="_blank" attribute.

 

Stop using pixel width & height attributes as the only control of the size of a <td> tag!!!

You do need to put in a pixel width attribute that is less than or equal to the width you want for a <table>, but never depend on them for the fixed width of a table cell.

Failure to do this on the final assignment will result in a full grade drop.

 

The syntax for creating multiple pseudo-classes to display on a page (more than one link style) is:

a.myclass:link {color:#006699;}

a.myclass:visited {color:#006699;}

a.myclass:hover {color:#006699;}

Remember, a pseudo-class rule usually looks like this:

a:link {color:#006699;}

a:visited {color:#003366;}

a:hover {color:#0099ff;}

 

  Sound

Danger!

Sounds can be big, really big.

Sounds that start without the user’s request can be annoying, especially with short loops.


  Sound Types

Non-streaming  vs. Streaming

Most modern browsers stream all audio and video

Non-streaming

When the browser sees the embed tag, it downloads the referenced file and keeps it in its cache before it starts playing.

Streaming

The audio is played as it arrives off the internet.

Real Audio can dynamically compensate for low speed connections by changing the file compression on the fly. But it requires RealNetwork’s proprietary server, and you’ve got to have your Internet Service Provider (ISP) provide it for your site.

MP3 can stream and has better sound than RealAudio, but slow connections can breakup the sound.

While streaming is the current standard, supporting older browsers will require wacky work-arounds to make it work.

 

Formats

.wav Windows format. Not well compressed, shouldn't be used
aiff Audio Interchange Format. Old Macintosh format. Also not well compressed and shouldn't be used
.au Unix audio file. Poor quality and poor compression. Don't use (if you can find one)
.mp2 Antecedent of mp3, outdated
.mp3

A stereo sound file that follows a standard compression technique, officially known as MPEG 1/2 Layer-3. MPEG stands for Motion Pictures Experts Group.

It is an open, non-proprietary format (no one owns it) originally developed for high-definition TV that can encode both video and audio. Virtually no audio information is lost in converting files to the MP3 format if the same sampling frequency or greater is used for encoding compared to that used in the original recording.

Compression varies from 12:1 for CD quality sound, to 96:1 for telephone quality.

Debatably better sounding than RealAudio.

The nitty-gritty from the inventors

And from the standards body

.avi Windows format. Can use mp3 compression
.mov

QuickTime Movie . Comes in different flavors:

Audio

Video

VR (Virtual Reality)

.mid

QuickTime Musical Instruments - MIDI (Musical Instrument Device Interface)

Doesn't include sound, but instructions on how to create sounds with the computers sound chips.

.ra RealNetworks RealAudio. Has special streaming abilities when combined with proprietary server.
.mp4

Requires updated plug-ins, most commonly QuickTime 6, which many Windows users do not have.

Apple is very big on it.

Other players are DivX5, XviD, 3ivX and mpegable

To embed mp4 is most likely to work if played with the QuickTime 6 player., which is a more complex combination of an <object> and <embed> tag.

"How to" details here.

  Embedding Sound

Recommended

Do it as an mp3 file

 

Steps

Capture the audio source

Garbage in, garbage out

There’s an excellent tutorial here.

Optimize

An art unto itself.

Encode

RealAudio use Helix Producer

Set to work with target audience’s bandwidth

mp3

All kinds of encoders out there

Embed

 

Upload...

...to your server, both the html file that refers to the audio and the audio file.

It’s best to keep your sound files in a separate folder, usually called sounds, audio or media.

 

  Embedding Sound

Recommend

Use .mp3 files. They work cross platform and in most browsers.

 

Steps

Capture the audio source

Garbage in, garbage out

There’s an excellent tutorial here.

 

Optimize

An art unto itself.

 

Encode

There's a ton of apps that do this.

 

Embed in your html

Choose to start automatically or wait for the user

<embed

Basic tag

src="sounds/parks.mp3"

The sound's source

autostart="true"

To start as soon as it streams in or not

height="16" width="18"

Standard height and width attributes

hidden="true"

Show or don't show (false or true) the controller bar

loop="true"

No loop - false

Infinite looping - true

/>

 

Example

 

Upload to your server

Both the html file that refers to the audio and the audio file. It’s best to keep your sound files in a separate folder, usually called audio or sounds.