How To Specify Multiple Alternative Video Or Audio File Formats Using HTML5

Written By: hightilidie on April 26, 2011 @ 6:20:12 AM

Article Grade Average:

Article Views: 13335

Share & Bookmark | | Articles RSS Feed | | Print | Grade Article

To send a link of this page to a friend just put their email address and your email address into the form below.

Grade

Meaning

Grade Chart

Grade

Meaning

Points

A+

Exceptional

15

A

Excellent

14

A-

Outstanding

13

B+

Praiseworthy

12

B

Notable

11

B-

Great

10

C+

Better

9

C

Very Good

8

C-

Good

7

D+

Acceptable

6

D

Fair

5

D-

Passable

4

F+

Inadequate

3

F

Poor

2

F-

Very Poor

1

Text Size | Bold Text

Undo Bold Text: N Bold Text: B

Default Text Size: N Decrease Text Size: Increase Text Size: +

The advantage of specifying multiple video or audio file formats is that if a user agent, like a browser for instance, doesn't support a file format the browser can go through the list of audio or video sources you specified, in order, to find and play a format that it supports. The browser will play the first supported file format it finds.

Now in order to add multiple alternative media resources to the <audio> and <video> element's, that the browser can choose from, you will need to use the new <source> element for HTML5.

The <source> element enables multiple media sources like a video file or audio file to be specified for the <audio> and <video> element's. The <source> element basically allows authors also known as the web pages creator to specify multiple versions of a media file.

User agents, like a browser for example, will go down the list of <source> element's until they find a file format that they are able to play.

Its very important to remember that if the <source> element is used, the src attribute should not be used with the <audio> and <video> element's. If the src attribute is used with the <audio> and <video> element's the <source> element or element's will be ignored.

Another important thing that you should remember when using the <source> element is that it must be placed in between the <video> element's or <audio> element's start tag and end tags, in other words the <source> element must be a child of the <video> element or <audio> element. The <source> element must also be placed before any <track> element's and flow content or phrasing content.

You may include one or more <source> element's. Each <source> element that you specify is a complete video file or audio file of its own.

The <source> element is considered a void element also known as an empty element, which means that the <source> element must have a start tag but must not have an end tag for HTML5 web pages. But for XHTML web pages all tags must be closed even void element's must be closed by adding a space which is optional and a trailing slash / to the end of the tag, for example <source src="music.ogg" /> in-order for the <source> element to validate in XHTML. You should note that the space added just before the slash is for backwards compatibility with older browsers.

The <source> element is allowed to use any global attribute, you can learn more about global attributes and how to use them in an earlier tutorial that I wrote called "What The Heck Are Global Attributes In HTML?". The <source> element can also use the attributes src, type and media. I will explain about these attributes in detail later on, after I show you how to code in the <source> element. But for now I will briefly explain the src attribute, since we will be using the src attribute in our first example. The src attribute will specify the location of the media file to be played.

Now let me show you how to code in the <source> element and the src attribute for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3"> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code in the new <source> element with the src attribute for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" /> 
  <p>This browser doesn't support the audio element.</p> 
 </audio> 

</body>
</html>

Now let me show you how to code in multiple <source> element's with the src attribute for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3">
  <source src="music.ogg"> 
  <source src="music.wav">  
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code in multiple <source> element's with the src attribute for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" />
  <source src="music.ogg" /> 
  <source src="music.wav" />  
  <p>This browser doesn't support the audio element.</p> 
 </audio> 

</body>
</html>

Now let me list and explain the <source> element's src, type and media attributes below.

src

The src attribute specifies the location of the audio file or video file to be played, for instance a video or music clip.

The src attributes value can be any absolute or relative URL value. An absolute URL value is basically all the information that a server requires to find the file, for instance src="http://www.example.com/movie.ogg" is considered an absolute URL value. And a relative URL value is essentially a URL that points to a link on a server in a local manner, while basically leaving out the domain name from the URL, for example src="/movie.ogg" is considered a relative URL value. Both types of URL's can optionally have leading and/or trailing space characters, which essentially means that your src attributes URL value can have white space before and or after the URL value, for example src=" http://www.example.com/movie.ogg ".

Now let me show you how to code the src attribute for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3"> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code the src attribute for the <source> element for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" /> 
  <p>This browser doesn't support the audio element.</p> 
 </audio> 

</body>
</html>
type

The type attribute specifies the video files or audio files MIME type to help the user agent, for example a browser, determine if it can play the media resource before fetching it.

If you are wondering what a MIME is, its short for Multipurpose Internet Mail Extensions which is a standard way of classifying file types on the Internet like audio files and video files.

The type attributes value must be a valid MIME type. A valid MIME type follows the following rules as defined in the RFC 2616. A valid MIME type value usually, starts with a required type, followed by a trailing slash "/" character, followed by a required subtype, and optionally followed by one or more instances of a semicolon ";" character followed by a parameter. So, for instance some valid MIME type values are, for example type="audio/wav" which is considered a valid MIME type value and type='video/ogg; codecs="theora, vorbis"' which is also considered a valid MIME type value with a parameter.

So the syntax for a valid MIME type value for the type attribute is type/subtype or in other words for example, video/ogg and the syntax for the parameter is attribute=value or in other words for instance, codecs="theora" where codecs is the parameter and theora is the value.

As I mentioned earlier you may also add an optional parameter to your MIME types value, which is known as the codecs parameter. The codecs parameter should be added to your MIME types value when more than a single codec is available. When you specify more than one codec value at a time you should use a comma "," to separate each codec value. The optional codecs parameter helps the user agent, for example a browser, determine if it can play the media resource before fetching it. Incase you are wondering what a codec is, its a technical name for "compression and decompression" also known as "compressor and decompressor" and "code and decode", which all mean the same thing. A codec is basically a computer program that encodes or in other words shrinks large video files and audio files, and then decodes them to make them playable on your computer.

You may have noticed that single and double quotes are used when specifying the type attribute and codecs parameter together. This is because using the same type of quotes as a string delimiter and inside the string doesn't work without escaping them.

Also when the codecs parameter has only one codec value you may leave out the double quotes for example, <source src="audio.ogg" type='audio/ogg; codecs=vorbis' /> but if the codecs parameter has more than one codec value you must include the double quotes for example, <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"' /> in order for your code to validate.

If you specify a type attribute that does not match your video file or audio file source, the browser may refuse to play the media file.

There are many MIME type values to choose from for the type attribute, so I will just list some of them below.

  • application/ogg
  • application/ogg; codecs="bogus"
  • application/mp4
  • application/mp4; codecs="bogus"
  • application/octet-stream
  • application/octet-stream; codecs="bogus"
  • audio/3gpp
  • audio/3gpp2
  • audio/aac
  • audio/x-aac
  • audio/aiff
  • audio/x-aiff
  • audio/ac3
  • audio/x-ac3
  • audio/basic
  • audio/flac
  • audio/x-flac
  • audio/mid
  • audio/midi
  • audio/x-midi
  • audio/mpeg
  • audio/x-mpeg
  • audio/mpegurl
  • audio/x-mpegurl
  • audio/mp4
  • audio/mp4; codecs="bogus"
  • audio/ogg
  • audio/ogg; codecs="bogus"
  • audio/wav
  • audio/wav; codecs="0"
  • audio/wav; codecs="1"
  • audio/wav; codecs="2"
  • audio/wave
  • audio/wave; codecs="0"
  • audio/wave; codecs="1"
  • audio/wave; codecs="2"
  • audio/x-wav
  • audio/x-wav; codecs="0"
  • audio/x-wav; codecs="1"
  • audio/x-wav; codecs="2"
  • audio/x-pn-wav
  • audio/x-pn-wav; codecs="0"
  • audio/x-pn-wav; codecs="1"
  • audio/x-pn-wav; codecs="2"
  • video/3gpp
  • video/3gpp2
  • video/avi
  • video/mpeg
  • video/x-mpeg
  • video/mp4
  • video/mp4; codecs="bogus"
  • video/msvideo
  • video/x-msvideo
  • video/quicktime
  • video/ogg
  • video/ogg; codecs="bogus"
  • video/mp4; codecs="avc1.42E01E, mp4a.40.2"
  • video/mp4; codecs="avc1.58A01E, mp4a.40.2"
  • video/mp4; codecs="avc1.4D401E, mp4a.40.2"
  • video/mp4; codecs="avc1.64001E, mp4a.40.2"
  • video/mp4; codecs="mp4v.20.8, mp4a.40.2"
  • video/mp4; codecs="mp4v.20.240, mp4a.40.2"
  • video/3gpp; codecs="mp4v.20.8, samr"
  • video/ogg; codecs="theora, vorbis"
  • video/ogg; codecs="theora, speex"
  • audio/ogg; codecs="vorbis"
  • audio/ogg; codecs="speex"
  • audio/ogg; codecs="flac"
  • video/ogg; codecs="dirac, vorbis"
  • video/x-matroska; codecs="theora, vorbis"
  • audio/webm
  • audio/webm; codecs="vorbis"
  • video/webm
  • video/webm; codecs="vorbis"
  • video/webm; codecs="vp8"
  • video/webm; codecs="vp8.0"
  • video/webm; codecs="vp8, vorbis"

First let me show you how to code the type attribute without the codecs parameter and then I will show you how to code the type attribute with the codecs parameter.

Here is how to code the type attribute for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" type="audio/mpeg"> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code the type attribute for the <source> element for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" type="audio/mpeg" /> 
  <p>This browser doesn't support the audio element.</p> 
 </audio> 

</body>
</html>

Now let me show you how to code the type attribute with the codecs parameter for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" type='video/ogg; codecs="theora, speex"'> 
  <p>This browser doesn't support the video element.</p>  
 </video> 

</body>
</html>

And here is how to code the type attribute with the codecs parameter for the <source> element for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" type='video/ogg; codecs="theora, speex"' /> 
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

You should know that even when you have multiple video files or audio files with the same MIME type, your codecs parameters value can be different. Let me show you what I mean in the example below which are all .ogg audio files with same MIME type but with different parameter values.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.ogg" type='audio/ogg; codecs="vorbis"'>
  <source src="music.spx" type='audio/ogg; codecs="speex"'>
  <source src="music.oga" type='audio/ogg; codecs="flac"'> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how multiple video files or audio files with the same MIME type but with different codecs parameter values look like in XHTML5 in the example below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.ogg" type='audio/ogg; codecs="vorbis"' />
  <source src="music.spx" type='audio/ogg; codecs="speex"' />
  <source src="music.oga" type='audio/ogg; codecs="flac"' /> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>
media

The media attribute specifies the intended media type for the audio file or video file, in order to help the user agent, for example a browser, determine if the specified media resource, for instance the audio file or video file, is useful to the user before fetching it.

The media attributes value must be a valid media query. You may include one or more media queries, combined in a comma-separated list. Each media query consists of a media type and zero or more expressions that check for the conditions of particular media features. First let me explain the media type values and then I will explain what expressions are and how to add them to the media attribute.

In case you are wondering what a media query is, it's basically a logical expression that is either true or false. A media query is true if the media type of the media query matches the media type of the output device like a computer or mobile phone for instance, where the user agent, for example a browser, is running and if all the expressions in the media query are true. Also, a media query which is otherwise false becomes true if the "not" keyword is present, I will explain about the allowed keywords later on in this tutorial.

The media attribute has eleven media type values you can choose from which include the all, aural, braille, embossed, handheld, print, projection, screen, speech, tty and the tv values which I will explain below in alphabetical order.

The first media type value is the all value which is the default value which will indicate that the media resource, for instance the audio file or video file, is suitable for all devices like a computer or mobile phone for example.

Now the second media type value is the aural value which has been deprecated, which basically means that you shouldn't use this value, instead you should use the media type value speech which I will explain later on in this tutorial. The aural value was intended for speech synthesizers.

The third media type value is the braille value which is intended for braille tactile feedback devices.

The fourth media type value is the embossed value which is intended for paged braille printers.

The fifth media type value is the handheld value which is intended for handheld devices that usually have a small screen and or limited bandwidth like a mobile phone for instance.

Now the sixth media type value is the print value which is intended for paged, opaque material like a printed page and for documents viewed on screen in print preview mode.

The seventh media type value is the projection value which is intended for projected presentations like for example, a projector.

Now the eighth media type value is the screen value which is intended mainly for color computer screens.

Now the ninth media type value is the speech value which is intended for speech synthesizers. You should know that the speech value replaced the aural value which has been deprecated in favor of the speech value.

The tenth media type value is the tty value which is intended for media using a fixed-pitch character grid, like for example, teletypes, terminals, or portable devices with limited display capabilities. Its important to remember that you should not use pixel units with the tty media type value.

The eleventh media type value is the tv value which is intended for television-type devices that usually have for example, low resolution, color, limited-scrollability screens and sound available.

All the media attributes media type name values are case-insensitive.

If you leave out the media attribute from the <source> element, the <source> element will act like if the media attributes all value is present meaning that the media resource, for instance the audio file or video file, is suitable for all devices like a computer or mobile phone for instance.

Now let me show you how to code the media attribute with the value of screen for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" media="screen"> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code the media attribute with the value of screen for the <source> element for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.mp3" media="screen" /> 
  <p>This browser doesn't support the audio element.</p> 
 </audio> 

</body>
</html>

Now let me show you how to code in multiple media queries which must be separated by a comma "," when placed in the media attribute for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <audio> 
  <source src="music.ogg" media="screen, print">
  <source src="music.spx" media="speech, screen, embossed">
  <source src="music.oga" media="handheld, braille, projection, tv"> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

And here is how to code in multiple media queries which must be separated by a comma "," when placed in the media attribute for the <source> element for HTML5 to create our XHTML5 web page.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <audio> 
  <source src="music.ogg" media="screen, print" />
  <source src="music.spx" media="speech, screen, embossed" />
  <source src="music.oga" media="handheld, braille, projection, tv" /> 
  <p>This browser doesn't support the audio element.</p>  
 </audio> 

</body>
</html>

Now earlier I mentioned that you can also add expressions to your media attributes media query values. Now the media attribute can have zero or more expressions which can contain media features. There are thirteen different media features that you can choose from which include width, height, device-width, device-height, orientation, aspect-ratio, device-aspect-ratio, color, color-index, monochrome, resolution, scan and grid which I will list and explain below but first let me explain on how to add an expression to the media attributes media query value.

Now when expressions are placed inside the media attribute they can contain either a media feature, or a media feature followed by a colon : and a value which is some what like a property/value pair. The expression in a media query must be enclosed in parentheses (..) for example, (color) or (color: 24) which are both valid expressions. I will show you how to code both the media feature by itself and with the a colon : and a value later on in this tutorial.

If the media feature is placed inside the media attribute by itself for example, media="(color)" or media="(color: 24)", its assumed to apply to all media types. The examples I just stated make use of the shorthand syntax that you can use for media queries that apply to all media types. For instance, the examples I just specified are the same as declaring media="all and (color)" for our first example and media="all and (color: 24)" for our second example. The only difference is that our shorthand syntax allows us to leave out the all media type and the "and" operator from or media queries.

The first media feature is the width feature which describes the width of the targeted display area of the output device, like for example, the width of the browser window for screen media or the width of the page box on a printer for print media. The width features value should be a length value which basically means it should be a number immediately followed by a unit identifier, some unit identifiers are px, em, ex, gd, rem, vw, vh, vm, ch, in, cm, mm, pt and pc, what each unit identifier stands for is another tutorial for another day. So, in other words the width features value should look something like (width: 700px) when placed in the media attribute. The width features value cannot be a negative number like -2 for example. The width media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The second media feature is the height feature which describes the height of the targeted display area of the output device, like for example, the height of the browser window for screen media or the height of the page box on a printer for print media. The height features value should be a length value which basically means it should be a number immediately followed by a unit identifier just like the width feature, some unit identifiers are px, em, ex, gd, rem, vw, vh, vm, ch, in, cm, mm, pt and pc, what each unit identifier stands for is another tutorial for another day, but what I will tell you is that the unit identifier px stands for pixel. So, in other words the height features value should look something like (height: 640px) when placed in the media attribute. The height features value cannot be a negative number like -2 for example. The height media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The third media feature is the device-width feature which describes the width of the rendering surface of the output device, like for example, the width of the screen for screen media or the width of the page sheet for print media. The device-width features value should be a length value which basically means it should be a number immediately followed by a unit identifier, some unit identifiers are px, em, ex, gd, rem, vw, vh, vm, ch, in, cm, mm, pt and pc, what each unit identifier stands for is another tutorial for another day, but what I will tell you is that the unit identifier px stands for pixel. So, in other words the device-width features value should look something like (device-width: 640px) when placed in the media attribute. The device-width features value cannot be a negative number like -24 for example. The device-width media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The fourth media feature is the device-height feature which describes the height of the rendering surface of the output device, like for instance, the height of the screen for screen media or the height of the page sheet for print media. The device-height features value should be a length value which basically means it should be a number immediately followed by a unit identifier, some unit identifiers are px, em, ex, gd, rem, vw, vh, vm, ch, in, cm, mm, pt and pc, what each unit identifier stands for is another tutorial for another day, but what I will tell you is that the unit identifier px stands for pixel. So, in other words the device-height features value should look something like (device-height: 640px) when placed in the media attribute. The device-height features value cannot be a negative number like -24 for example. The device-height media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

Now the fifth media feature is the orientation feature which indicates whether the device is in landscape mode or in portrait mode. A device is in landscape mode when the devices display is wider than it is tall. And the device is in portrait mode when the devices display is taller than it is wide. The orientation feature has two values to choose from which include the landscape value which will check if the device is in landscape mode or the portrait value which will check if the device is in portrait mode.

The sixth media feature is the aspect-ratio feature which describes the aspect ratio of the targeted display area of the output device, like for example, the browser window for screen media or the page box on a printer for print media. The aspect-ratio features value must consists of two positive integers also known as numbers that are separated by a forward slash "/" character. The aspect-ratio features value represents the number of horizontal pixels over the number of vertical pixels. The first number or numbers stated before the forward slash "/" character represent the horizontal pixels and the number or numbers stated after the forward slash "/" character represent the vertical pixels. So, in other words the aspect-ratio features value should look something like (aspect-ratio: 16/9) when placed in the media attribute. The aspect-ratio media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The seventh media feature is the device-aspect-ratio feature which describes the aspect ratio of the output device, like for example, the screen for screen media or the page sheet for print media. The device-aspect-ratio features value must consists of two positive integers also known as numbers that are separated by a forward slash "/" character. The device-aspect-ratio features value represents the number of horizontal pixels over the number of vertical pixels. The first number or numbers stated before the forward slash "/" character represent the horizontal pixels and the number or numbers stated after the forward slash "/" character represent the vertical pixels. So, in other words the device-aspect-ratio features value should look something like (device-aspect-ratio: 16/9) when placed in the media attribute. The device-aspect-ratio media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The eighth media feature is the color feature which indicates the number of bits per color component of the output device. The color feature can have any positive integer also known as a number as it's value for example, (color: 8) which when placed in the media attribute checks for any output device with 8 bits per color component. The color features value cannot be a negative number like -24 for example. If the color features output device is not a color device, the value of the color feature will be zero. The color media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

You should note that if the color components of the output device have different numbers of bits per color component, the smallest number will be used. For example, if a color system uses 5 bits for red and 8 bits for green and 4 bits for blue, then the color features value will be 4. And if the output device uses indexed colors, the minimum number of bits per color component in the color lookup table is used.

Now the ninth media feature I will explain is the color-index feature which indicates the number of color entries in the color lookup table that the output device can handle, in other words, the total number of colors a device can run at the same time when displayed. The color-index feature can have any positive integer also known as a number as it's value for example, (color-index: 256) which when placed in the media attribute checks for any output device with 256 colors exactly. The color-index features value cannot be a negative number like -24 for example. And if the color-index features output device does not use a color lookup table, the value of the color-index feature will be zero. The color-index media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

The tenth media feature is the monochrome feature which indicates the number of bits per pixel on a monochrome greyscale frame buffer device. The monochrome feature can have any positive integer also known as a number as it's value, for example, (monochrome: 8) which when placed in the media attribute checks for any output device with 8 bits per pixel. The monochrome features value cannot be a negative number like -24 for example. If the monochrome features output device is not a monochrome device, the value of the monochrome feature will be zero. The monochrome media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

Now the eleventh media feature is the resolution feature which indicates the resolution, or in other words the density of the pixels of the output device. The resolution feature can have any positive integer also known as a number immediately followed by one of the unit identifiers that can be either dpi which means "dots per inch" or dpcm which means "dots per centimeter" as it's value, for example, (resolution: 600dpi). The resolution features value cannot be a negative number like -24dpi or -3002dpcm for example. The resolution media feature may also use the optional min- or max- prefixes, I will explain how you should use these prefixes later on in this tutorial.

Now the twelfth media feature I will explain now is the scan feature which describes the scanning process of television output devices. The scan feature can have one of two values which are the progressive or interlace values which I will explain below. The scan feature is meant to be used with the tv media type.

The scan features progressive value will check if the output device like a computer monitor or digital television screen uses progressive scanning. Progressive scanning is a way of displaying images on a screen by scanning each line or row of pixels one at a time in a sequential order. In other words the images horizontal lines or pixel rows are scanned in numerical order, for example, "1,2,3" and so on, down the screen from top to bottom.

And the scan features interlace value will check if the output device like a computer monitor or digital television screen uses interlace scanning. Interlace scanning refers to an image that is displayed on a screen by scanning or displaying each line or row of pixels that make up the image, in an alternate order between showing even and odd lines. For example, the images lines or pixel rows are scanned down the screen from top to bottom, in an alternate order from lines or rows like "1,3,5" and so on, followed by lines or rows "2,4,6" and so on.

Now the thirteenth and last media feature that I will explain is the grid feature which determines whether the output device is a grid device or a bitmap device. A grid device is something like a tty terminal or phone display with only one font. And a bitmap device is something like a computer monitor. The grid feature has two integer values also known as number values that you can choose from, the first number value is the number 1 which is for grid-based output devices, which simply means that the value of 1 is a positive match for grid-based displays. The second value is the number 0 which is for all other devices that are not grid-based. So, in other words our grid features value would look something like (grid: 1) when placed in the media attribute.

Now let me show you how to add an expression to the media attributes media query value using the aspect-ratio media feature for the <source> element for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="screen and (aspect-ratio: 1280/720)"> 
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

And here is how to add an expression to the media attributes media query value using the aspect-ratio media feature for the <source> element for HTML5 to create our XHTML5 web page in the example below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="screen and (aspect-ratio: 1280/720)" /> 
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

Now most media features can also accept the optional min- or max- prefixes to express "greater or equal to" and "smaller or equal to" constraints. So, in other words the min- prefix basically means the minimum or lowest value possible and the max- prefix basically means the maximum or highest value possible. The min- and max- prefixes are used in-order to avoid using the less-than sign "<" and greater-than sign ">" characters which may cause problems with HTML and XML. Media features that use the min- or max- prefixes or in other words have the min- or max- prefixed to them cannot be used without a value. If a media feature uses one of the min- or max- prefixes and has no value stated the media query will not validate.

The following media features color, color-index, aspect-ratio, device-aspect-ratio, device-height, device-width, height, monochrome, resolution and width can all use the min- and max- prefixes. In order to use the min- and max- prefixes all you have to do is append one of the prefixes to the beginning of the media feature for example, (min-width: 600px) which means the width of the media feature should be at least 600px.

Now let me show you how to code in the <source> element's media attributes media features min- and max- prefixes for HTML5 in the example below.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="handheld and (min-width: 15em)"> 
  <source src="video.avi" media="screen and (max-height: 1200px)">   
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

And here is how to code in the <source> element's media attributes media features min- and max- prefixes for HTML5 to create our XHTML5 web page in the example below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="handheld and (min-width: 15em)" /> 
  <source src="video.avi" media="screen and (max-height: 1200px)" />   
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

Okay, before I end this long boring tutorial let me just explain a few more things. If you have managed to stay up reading this tutorial you would have noticed that there are commas "," and the word "and" included in the values of the media attributes media queries. The commas "," and the word "and" are known as operators which you can use with your media queries, but their are also other operators that you can use with the media attributes media query values which include the "not" and "only" operators. I will list and explain what each operator does below for your convenience.

The and operator also known as the and keyword specifies an and operator which means the media queries expression or expressions must match or in other words be true.

The not operator also known as the not keyword specifies a not operator which means that the query is true when it doesn't match. User agents that only support the media types all, aural, braille, handheld, print, projection, screen, tty and tv which are described in HTML4 will not recognize the not keyword which will result in the media resource not begin played or displayed.

The only operator also known as the only keyword hides the media resource like an audio file or video file from browsers that don't support media queries. So, basically user agents, like a browser for instance, must process media queries starting with the only operator as if the only keyword was not present.

And the comma "," operator acts like an "or" operator which means one of the media queries must match or in other words be true.

Now let me show you how to code in the operators for the media attributes media query values for HTML5 in the example below and then I will explain what each media attributes value means.

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Welcome To HTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="screen, (color)"> 
  <source src="video.avi" media="screen and (color)"> 
  <source src="video.mp4" media="not screen and (color)">   
  <source src="video.ogv" media="only projection and (color)"> 
  <source src="video.mpeg" media="projection, screen and (color)"> 
  <source src="video.wmv" media="screen and (min-width: 800px) and (max-width: 1280px)">  
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

And here is how to code in the operators for the media attributes media query values for XHTML5 in the example below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Welcome To XHTML5</title>
</head>
<body>

 <video> 
  <source src="video.ogv" media="screen, (color)" /> 
  <source src="video.avi" media="screen and (color)" /> 
  <source src="video.mp4" media="not screen and (color)" />   
  <source src="video.ogv" media="only projection and (color)" /> 
  <source src="video.mpeg" media="projection, screen and (color)" /> 
  <source src="video.wmv" media="screen and (min-width: 800px) and (max-width: 1280px)" />  
  <p>This browser doesn't support the video element.</p> 
 </video> 

</body>
</html>

Let me explain what each media attributes value means from the examples above so you can have a better understanding of what the operators can do.

First up is the first media attributes value "screen, (color)" which basically means that the media resource like a video file or audio file is intended for a screen or anything that supports color.

Now the value "screen and (color)" for the media attribute basically means that the media resource like a video file or audio file is intended for a color screen.

Now the third value "not screen and (color)" for the media attribute basically means that the media resource like a video file or audio file is not intended for a color screen but all other media types may be selected.

Now the fourth media attributes value "only projection and (color)" basically selects color projection media in user agents that implement media queries. User agents that only support the media types all, aural, braille, handheld, print, projection, screen, tty and tv which are described in HTML4, will ignore the operator only and hide the media resource as a result, the reason for this is because the only operator is not supported in HTML4. If the operator only were to be left out, old user agents like a browser would select all projection media, because it would just extract that first word which would be projection and will ignore the other entries which in are case is the and operator and media feature color for example, "and (color)".

The fifth media attributes value "projection, screen and (color)" will select all projection media or color screen media devices.

Now the sixth and final media attributes value "screen and (min-width: 800px) and (max-width: 1280px)" will select all screen-based devices with a width between 800 pixels and 1280 pixels.

0 Comments

 

Important: This site cannot guarantee the accuracy of articles, comments, answers and other types of content or media submitted by members or anonymous users and guests, and we recommend that you use common sense when following any advice or information found on this site. Read our full Content Disclaimer Agreement here.

About The Author

hightilidie's Avatar
hightilidie
Web Designer
California
United States
  • Grade Average: N/A

  • Article First Published: Apr 26, 2011 @ 6:20:12 AM

  • Published Version: 1

  • Articles Posted: 18

  • Authors RSS Feed

Categories

View All
  1. ▸ Arts & Entertainment
    1.       ▸ Amusement & Theme Parks
    2.       ▸ Art Appreciation
    3.       ▸ Artists
    4.       ▸ Audio & Visual Equipment
    5.       ▸ Books & Authors
    6.       ▸ Buying & Selling Art
    7.       ▸ Celebrities
    8.       ▸ Comics & Animation
    9.       ▸ Contests & Sweepstakes
    10.       ▸ Dancing
    11.       ▸ Design & Decorative Arts
    12.       ▸ Drawing & Sketching
    13.       ▸ Fashion
    14.       ▸ Humanities
    15.       ▸ Jokes & Riddles
    16.       ▸ Magazines
    17.       ▸ Magic
    18.       ▸ Movies & Film
    19.       ▸ Museums & Galleries
    20.       ▸ Music
    21.       ▸ Painting
    22.       ▸ Performing Arts
    23.       ▸ Photography
    24.       ▸ Polls, Surveys & Contests
    25.       ▸ Pop Culture
    26.       ▸ Radio
    27.       ▸ Sculpture
    28.       ▸ Sheet Music & Scores
    29.       ▸ Television
    30.       ▸ Theater & Acting
    31.       ▸ Visual Arts
    32.       ▸ Writing Services
    33.       ▸ More Arts & Entertainment
  2. ▸ Automotive & Transportation
    1.       ▸ All-Terrain Vehicles
    2.       ▸ Automotive
    3.       ▸ Aviation
    4.       ▸ Bicycles
    5.       ▸ Commuting
    6.       ▸ Emergency Vehicles
    7.       ▸ Heavy Trucks & Buses
    8.       ▸ Hitchhiking
    9.       ▸ Public Transport
    10.       ▸ Rail Transport
    11.       ▸ Roads, Highways & Streets
    12.       ▸ Ships & Boats
    13.       ▸ Spaceflight
    14.       ▸ More Automotive & Transportation
  3. ▸ Business & Finance
    1.       ▸ Accounting & Taxes
    2.       ▸ Angels & Private Equity
    3.       ▸ Business Life
    4.       ▸ Business Networking
    5.       ▸ Business Planning
    6.       ▸ Business School
    7.       ▸ Business Security
    8.       ▸ Business To Business
    9.       ▸ Business To Consumer
    10.       ▸ Business Travel
    11.       ▸ Career & Job Services
    12.       ▸ Consulting
    13.       ▸ Corporations
    14.       ▸ Credit & Debt
    15.       ▸ E-Commerce
    16.       ▸ Economics
    17.       ▸ Employment Issues
    18.       ▸ Finance & Accounting
    19.       ▸ Financial Planning
    20.       ▸ General Management
    21.       ▸ Government & Regulations
    22.       ▸ Industrial Products & Services
    23.       ▸ Insurance
    24.       ▸ International Business
    25.       ▸ Investment
    26.       ▸ Loans
    27.       ▸ Management & Leadership
    28.       ▸ Marketing & Advertising
    29.       ▸ Non-Profit Organizations
    30.       ▸ Office Supplies & Services
    31.       ▸ Organizational Behavior
    32.       ▸ Party Services
    33.       ▸ Personal Finance
    34.       ▸ Publicity & Promotion
    35.       ▸ Renting & Real Estate
    36.       ▸ Secretarial Services
    37.       ▸ Selling A Business
    38.       ▸ Skills
    39.       ▸ Small Businesses & Entrepreneurs
    40.       ▸ Translation Services
    41.       ▸ More Business & Finance
  4. ▸ Computers & Programming
    1.       ▸ Certification
    2.       ▸ Computer Forensics
    3.       ▸ Computer Repair, Maintenance & Upgrading
    4.       ▸ Computer Science
    5.       ▸ Databases
      1.          ▸ 4GL
      2.          ▸ Administration
      3.          ▸ Berkeley DB
      4.          ▸ Clarion
      5.          ▸ Contact Management
        1.             ▸ ACT
        2.             ▸ Goldmine
        3.             ▸ More Contact Management
      6.          ▸ Data Manipulation
        1.             ▸ Data Mining
        2.             ▸ Predictive Analysis
        3.             ▸ More Data Manipulation
      7.          ▸ DB2
      8.          ▸ dBASE
      9.          ▸ Distributed Databases
      10.          ▸ FileMaker
      11.          ▸ Firebird
      12.          ▸ FoxPro
      13.          ▸ GIS & GPS
      14.          ▸ Informix
      15.          ▸ Ingres
      16.          ▸ Interbase
      17.          ▸ InterSystems Cache
      18.          ▸ JDeveloper
      19.          ▸ LDAP
      20.          ▸ MS Access
        1.             ▸ Access Architecture & Design
        2.             ▸ Access Coding & Macros
        3.             ▸ Access Forms
        4.             ▸ Access Reports
        5.             ▸ ADP
        6.             ▸ Queries (SQL)
        7.             ▸ More MS Access
      21.          ▸ MS SQL Server
      22.          ▸ MUMPS
      23.          ▸ MySQL
      24.          ▸ Object Databases
      25.          ▸ OLAP
      26.          ▸ Oracle
      27.          ▸ PostgreSQL
      28.          ▸ PowerBuilder
      29.          ▸ Relational Databases
      30.          ▸ Reporting
        1.             ▸ Actuate
        2.             ▸ Business Objects
        3.             ▸ Crystal Reports
        4.             ▸ Essbase
        5.             ▸ MicroStrategy
        6.             ▸ SQR
        7.             ▸ More Reporting
      31.          ▸ SAS
      32.          ▸ Sybase
      33.          ▸ XML & Databases
      34.          ▸ More Databases
    6.       ▸ Graphic Design
    7.       ▸ Handhelds & PDAs
    8.       ▸ Hardware
    9.       ▸ Help For Beginners
    10.       ▸ Internet
      1.          ▸ Internet Access & Providers
      2.          ▸ Internet Issues
      3.          ▸ Internet Search Issues
      4.          ▸ Internet Text Messaging
      5.          ▸ Internet Tips
      6.          ▸ Internet Trends
      7.          ▸ IP Addresses
      8.          ▸ Search Engines
        1.             ▸ AOL Search
        2.             ▸ Ask
        3.             ▸ Bing
        4.             ▸ Google
        5.             ▸ Internet Searches
        6.             ▸ Search Engine Optimization (SEO)
        7.             ▸ Technorati
        8.             ▸ Yahoo Search
        9.             ▸ More Search Engines
      9.          ▸ Social Media
        1.             ▸ Blogs
          1.                ▸ Blogger
          2.                ▸ LiveJournal
          3.                ▸ TypePad
          4.                ▸ WordPress
          5.                ▸ More Blogs
        2.             ▸ Collaboration
          1.                ▸ Delicious
          2.                ▸ DeviantArt
          3.                ▸ Digg
          4.                ▸ Live Spaces
          5.                ▸ Mashup
          6.                ▸ Mixx
          7.                ▸ Reddit
          8.                ▸ RSS
          9.                ▸ Wikipedia
          10.                ▸ More Collaboration
        3.             ▸ Forums
          1.                ▸ Dolphin
          2.                ▸ Online Groups
          3.                ▸ phpBB
          4.                ▸ vBulletin
          5.                ▸ More Forums
        4.             ▸ Multimedia
          1.                ▸ Flickr
          2.                ▸ Jumpcut
          3.                ▸ Picasa
          4.                ▸ PixelFish
          5.                ▸ Shutterfly
          6.                ▸ SmugMug
          7.                ▸ Snapfish
          8.                ▸ Vimeo
          9.                ▸ YouTube
          10.                ▸ Zooomr
          11.                ▸ More Multimedia
        5.             ▸ Online Marketplaces
          1.                ▸ Amazon
          2.                ▸ Craigslist
          3.                ▸ eBay
          4.                ▸ Etsy
          5.                ▸ More Online Marketplaces
        6.             ▸ Social Networking
          1.                ▸ Bebo
          2.                ▸ Cyworld
          3.                ▸ Facebook
          4.                ▸ Friendster
          5.                ▸ Hi5
          6.                ▸ LinkedIn
          7.                ▸ MySpace
          8.                ▸ Nexopia
          9.                ▸ Ning
          10.                ▸ Orkut
          11.                ▸ Tumblr
          12.                ▸ Twitter
          13.                ▸ More Social Networking
        7.             ▸ More Social Media
      10.          ▸ Web Browsers
        1.             ▸ AOL
        2.             ▸ Firefox
        3.             ▸ Google Chrome
        4.             ▸ Internet Explorer
        5.             ▸ Lynx
        6.             ▸ Mobile & Handheld
        7.             ▸ Mozilla
        8.             ▸ Opera
        9.             ▸ Safari
        10.             ▸ More Web Browsers
      11.          ▸ Website Reviews
      12.          ▸ More Internet
    11.       ▸ Internet Marketing
    12.       ▸ Multimedia
    13.       ▸ Online Advertising
    14.       ▸ Open Source
    15.       ▸ Operating Systems
    16.       ▸ Programming
      1.          ▸ Algorithms
      2.          ▸ Languages
        1.             ▸ ADA
        2.             ▸ Assembly
        3.             ▸ BASIC
        4.             ▸ C
        5.             ▸ C#
        6.             ▸ C++
        7.             ▸ COBOL
        8.             ▸ CORBA
        9.             ▸ D
        10.             ▸ DCOM
        11.             ▸ Delphi
        12.             ▸ Erlang
        13.             ▸ Forth
        14.             ▸ Fortran
        15.             ▸ Java
        16.             ▸ LabView
        17.             ▸ Lisp
        18.             ▸ MatLab
        19.             ▸ Parsers
        20.             ▸ Pascal
        21.             ▸ Perl
        22.             ▸ Python
        23.             ▸ REBOL
        24.             ▸ Regular Expressions
        25.             ▸ REXX
        26.             ▸ Scripting
          1.                ▸ ActionScript
          2.                ▸ AJAX
          3.                ▸ AppleScript
          4.                ▸ JavaScript
          5.                ▸ JScript
          6.                ▸ PHP
          7.                ▸ Powershell
          8.                ▸ Ruby
          9.                ▸ Shell Scripting
          10.                ▸ TCL
          11.                ▸ Windows PowerShell
          12.                ▸ More Scripting
        27.             ▸ Smalltalk
        28.             ▸ SQL Syntax
        29.             ▸ Visual Basic
        30.             ▸ Winsock
        31.             ▸ More Languages
      3.          ▸ Theory
      4.          ▸ More Programming
    17.       ▸ Security & Encryption
      1.          ▸ Anti-Spam
      2.          ▸ Anti-Spyware
      3.          ▸ Anti-Virus
      4.          ▸ Cell Phones
      5.          ▸ Encryption
      6.          ▸ Hardware Firewalls
      7.          ▸ IDS
      8.          ▸ Internet Security & Safety
        1.             ▸ Email & Phishing Security
        2.             ▸ Hacking
        3.             ▸ Identity Theft & Internet Scams
        4.             ▸ Spam
        5.             ▸ Spyware & Adware
        6.             ▸ Tools & Utilities
        7.             ▸ Virus Protection & Maintenance
        8.             ▸ Web Browser Security
        9.             ▸ More Internet Security & Safety
      9.          ▸ Latest Threats
      10.          ▸ Operating Systems Security
        1.             ▸ Apple
        2.             ▸ Linux
        3.             ▸ Microsoft
        4.             ▸ Unix
        5.             ▸ More Operating Systems Security
      11.          ▸ Software Firewalls
      12.          ▸ Vulnerabilities
      13.          ▸ Web Applications
      14.          ▸ Wireless Security
      15.          ▸ More Security & Encryption
    18.       ▸ Shareware & Freeware
    19.       ▸ Software
    20.       ▸ System Administration
    21.       ▸ Telecommunications
    22.       ▸ Web Development
      1.          ▸ Blogs
        1.             ▸ Blogger
        2.             ▸ Movable Type
        3.             ▸ WordPress
        4.             ▸ More Blogs
      2.          ▸ Graphics
        1.             ▸ Adobe Fireworks
        2.             ▸ Adobe Flash
        3.             ▸ Adobe Illustrator
        4.             ▸ Adobe Photoshop
        5.             ▸ More Graphics
      3.          ▸ Web Authoring
      4.          ▸ Web Design
      5.          ▸ Web Languages & Standards
        1.             ▸ ASP
        2.             ▸ ASP.NET
        3.             ▸ BPEL
        4.             ▸ CGI
        5.             ▸ ColdFusion Markup Language (CFML)
        6.             ▸ CSS
        7.             ▸ DHTML
        8.             ▸ Disability Access
        9.             ▸ Flex
        10.             ▸ HTML
        11.             ▸ ImageMagick
        12.             ▸ JavaScript
        13.             ▸ JSP
        14.             ▸ OWL
        15.             ▸ PHP
        16.             ▸ RSS
        17.             ▸ SOAP
        18.             ▸ SSI
        19.             ▸ SSL & HTTPS
        20.             ▸ SSML
        21.             ▸ VXML
        22.             ▸ WSDL
        23.             ▸ XHTML
        24.             ▸ XML
        25.             ▸ XMPP
        26.             ▸ XSL Formatting Objects
        27.             ▸ XSLT
        28.             ▸ More Web Languages & Standards
      6.          ▸ Web Servers
      7.          ▸ Web Services
      8.          ▸ More Web Development
    23.       ▸ Wireless Technology & Networking
    24.       ▸ More Computers & Programming
  5. ▸ Coupons & Deals
    1.       ▸ Local Coupons
    2.       ▸ Online Coupons
    3.       ▸ Print Coupons & Rebates
    4.       ▸ More Coupons & Deals
  6. ▸ Education & Reference
    1.       ▸ Adult Education
    2.       ▸ Alternative Education
    3.       ▸ Classmates
    4.       ▸ Colleges & Universities
    5.       ▸ Continuing Education
    6.       ▸ Distance Learning
    7.       ▸ Early Childhood Ed
    8.       ▸ Educational Philosophy
    9.       ▸ Exchange Students
    10.       ▸ Financial Aid
    11.       ▸ Grade School
    12.       ▸ High School
    13.       ▸ Home Schooling
    14.       ▸ Homework Help
    15.       ▸ International Studies
    16.       ▸ Languages
    17.       ▸ Learning Disabilities
    18.       ▸ Learning Styles & Skills
    19.       ▸ Mentoring
    20.       ▸ Middle School
    21.       ▸ Online Education
    22.       ▸ Preschool
    23.       ▸ Quotations
    24.       ▸ Reading & Writing Skills
    25.       ▸ Religious Schools
    26.       ▸ School Bullying & Violence
    27.       ▸ School Issues
    28.       ▸ School Subjects
    29.       ▸ Special Education
    30.       ▸ Standards & Testing
    31.       ▸ Student Organizations
    32.       ▸ Study Techniques
    33.       ▸ Studying Abroad
    34.       ▸ Teachers & Administrators
    35.       ▸ Teaching
    36.       ▸ Trivia
    37.       ▸ Tutoring
    38.       ▸ Words & Wordplay
    39.       ▸ More Education & Reference
  7. ▸ Electronics
    1.       ▸ Accessories & Supplies
    2.       ▸ Cameras & Photography
    3.       ▸ Car Audio & Electronics
    4.       ▸ Computers & Accessories
    5.       ▸ GPS & Navigation
    6.       ▸ Home Audio & Theater
    7.       ▸ Marine Electronics
    8.       ▸ Office Electronics
    9.       ▸ Portable Electronics
    10.       ▸ Security & Surveillance
    11.       ▸ Telephones & Communications
    12.       ▸ Televisions & Video
    13.       ▸ More Electronics
  8. ▸ Environment
    1.       ▸ Activism & Volunteering
    2.       ▸ Climate Change
    3.       ▸ Conservation
    4.       ▸ Energy Issues
    5.       ▸ Environmental Awareness
    6.       ▸ Environmental Events
    7.       ▸ Environmental Law & Policy
    8.       ▸ Food & Agriculture
    9.       ▸ Green Living & Design
    10.       ▸ Health & Environment
    11.       ▸ Pollution
    12.       ▸ Trash & Recycling
    13.       ▸ More Environment
  9. ▸ Family & Relationships
    1.       ▸ Ancestry & Genealogy
    2.       ▸ Communication
    3.       ▸ Crisis Support & Help
    4.       ▸ Family
    5.       ▸ Friends & Peers
    6.       ▸ Gay & Lesbian
    7.       ▸ Love & Relationships
    8.       ▸ Military Families
    9.       ▸ Weddings
    10.       ▸ More Family & Relationships
  10. ▸ Fashion & Beauty
    1.       ▸ Accessories
    2.       ▸ Beauty Pageants
    3.       ▸ Body Art
    4.       ▸ Body Image
    5.       ▸ Clothes
    6.       ▸ Cosmetic Brands
    7.       ▸ Cosmetic Procedures
    8.       ▸ Designers & Labels
    9.       ▸ Fashion & Beauty Websites
    10.       ▸ Fashion Events
    11.       ▸ Fashion Magazines
    12.       ▸ Fashion Museums
    13.       ▸ Fashion Organizations
    14.       ▸ Fur
    15.       ▸ Jewelry
    16.       ▸ Leather
    17.       ▸ Makeup
    18.       ▸ Modeling
    19.       ▸ Organic Beauty Products
    20.       ▸ Perfumes & Fragrances
    21.       ▸ Personal Care
    22.       ▸ Shoes
    23.       ▸ Watches
    24.       ▸ Wedding Apparel & Accessories
    25.       ▸ More Fashion & Beauty
  11. ▸ Food & Drink
    1.       ▸ Additives
    2.       ▸ Baby Food
    3.       ▸ Baking
    4.       ▸ Canning & Preserving
    5.       ▸ Cheese & Dairy
    6.       ▸ Chefs
    7.       ▸ Cooking For Kids
    8.       ▸ Cooking Tips
    9.       ▸ Culinary Arts & Techniques
    10.       ▸ Desserts & Sweets
    11.       ▸ Dining Out
    12.       ▸ Drinks & Beverages
    13.       ▸ Entertaining
    14.       ▸ Food
    15.       ▸ Food Allergies
    16.       ▸ Fruits
    17.       ▸ Gastronomy
    18.       ▸ Gourmet Food
    19.       ▸ Herbs, Spices & Condiments
    20.       ▸ Home Style
    21.       ▸ Jams, Jellies & Preserves
    22.       ▸ Meals
    23.       ▸ Meat, Poultry & Seafood
    24.       ▸ Natural Foods
    25.       ▸ Nutrition
    26.       ▸ Organic Cooking
    27.       ▸ Outdoor Cooking
    28.       ▸ Pasta
    29.       ▸ Picnics
    30.       ▸ Professional Cooking
    31.       ▸ Quick & Easy
    32.       ▸ Reference
    33.       ▸ Regional & International
    34.       ▸ Rice & Grains
    35.       ▸ Salads
    36.       ▸ Sauces, Salsa & Garnishes
    37.       ▸ School Baking
    38.       ▸ Snacks
    39.       ▸ Soups
    40.       ▸ Spam
    41.       ▸ Special Appliances
    42.       ▸ Special Diet
    43.       ▸ Special Occasions
    44.       ▸ Vegetables
    45.       ▸ More Food & Drink
  12. ▸ Government & Politics
    1.       ▸ Activism
    2.       ▸ Civic Participation
    3.       ▸ Conspiracy Theories
    4.       ▸ Elections
    5.       ▸ Embassies & Consulates
    6.       ▸ Freedom & Security
    7.       ▸ Globalization
    8.       ▸ Government
    9.       ▸ Government Agencies
    10.       ▸ History & Theory
    11.       ▸ Human Rights
    12.       ▸ Ideologies
    13.       ▸ Immigration
    14.       ▸ International
    15.       ▸ Labor & Industrial Relations
    16.       ▸ Labor Unions
    17.       ▸ Law & Ethics
    18.       ▸ Law Enforcement & Police
    19.       ▸ Leadership
    20.       ▸ Lobbying
    21.       ▸ Military
    22.       ▸ Planning
    23.       ▸ Political Parties
    24.       ▸ Politics
    25.       ▸ Social Security
    26.       ▸ Taxes
    27.       ▸ U.S. Government
    28.       ▸ More Government & Politics
  13. ▸ Health & Medicine
    1.       ▸ Administration & Medicine Economics
    2.       ▸ Advice
    3.       ▸ Aging
    4.       ▸ Allied Health Professions
    5.       ▸ Alternative Medicine
    6.       ▸ Anti-Aging
    7.       ▸ Basic Sciences
    8.       ▸ Cancer
    9.       ▸ Child & Adolescent Health
    10.       ▸ Chiropractic Medicine
    11.       ▸ Death & Grief
    12.       ▸ Dental
    13.       ▸ Diet & Nutrition
    14.       ▸ Disabilities
    15.       ▸ Disorders & Diseases
    16.       ▸ Emergency Medicine
    17.       ▸ Eye Care
    18.       ▸ First Aid
    19.       ▸ Fitness
    20.       ▸ General Health Care
    21.       ▸ Medical Ethics
    22.       ▸ Medical Facts
    23.       ▸ Medical Informatics
    24.       ▸ Medical Oddities
    25.       ▸ Medical Publications
    26.       ▸ Medicine
    27.       ▸ Men's Health
    28.       ▸ Mental & Emotional Health
    29.       ▸ Non-Clinical
    30.       ▸ Nursing
    31.       ▸ Occupational Therapy
    32.       ▸ Optical
    33.       ▸ Pediatrics
    34.       ▸ Personal Health
    35.       ▸ Pharmaceuticals
    36.       ▸ Pharmacology
    37.       ▸ Physical Therapy
    38.       ▸ Plastic Surgery
    39.       ▸ Pregnancy & Childbirth
    40.       ▸ Professional
    41.       ▸ Psychology & Counseling
    42.       ▸ Public & Environmental Health
    43.       ▸ Quit Smoking
    44.       ▸ Recovery
    45.       ▸ Reproductive Health
    46.       ▸ Research
    47.       ▸ Respiratory Therapy
    48.       ▸ Safety & First Aid
    49.       ▸ Self Help
    50.       ▸ Seniors' Health
    51.       ▸ Sexual Health
    52.       ▸ Skin Care
    53.       ▸ Specialty Medicine
    54.       ▸ Speech Therapy
    55.       ▸ Stress Management
    56.       ▸ Substance Abuse & Addiction
    57.       ▸ Supplements & Vitamins
    58.       ▸ Weight Loss
    59.       ▸ Wellness
    60.       ▸ Women's Health
    61.       ▸ More Health & Medicine
  14. ▸ Hobbies & Crafts
    1.       ▸ Action Figures
    2.       ▸ Antiques
    3.       ▸ Birding
    4.       ▸ Coin Collecting
    5.       ▸ Collecting
    6.       ▸ Comic Books
    7.       ▸ Crafts
    8.       ▸ Dolls
    9.       ▸ Historical Reenactment
    10.       ▸ Model Building
    11.       ▸ Non-Sports Cards
    12.       ▸ Outdoor Hobbies
    13.       ▸ Photography
    14.       ▸ Pottery
    15.       ▸ Puzzles & Games
    16.       ▸ Radio-Controlled Models
    17.       ▸ Rubber Stamping
    18.       ▸ Second Hand Shopping
    19.       ▸ Snail Mail Pen Pals
    20.       ▸ Soap Making
    21.       ▸ Sports Cards
    22.       ▸ Stamp Collecting
    23.       ▸ More Hobbies & Crafts
  15. ▸ Home & Garden
    1.       ▸ Architecture
    2.       ▸ Artwork
    3.       ▸ Basics
    4.       ▸ Bedding & Bath
    5.       ▸ Carpentry & Construction
    6.       ▸ Cleaning & Laundry
    7.       ▸ Decorating & Remodeling
    8.       ▸ Do It Yourself (DIY)
    9.       ▸ Foundations
    10.       ▸ Furniture & Decor
    11.       ▸ Gardening
    12.       ▸ Green Living
    13.       ▸ Home Appliances
    14.       ▸ Home Improvement
    15.       ▸ Interior Design & Decorating
    16.       ▸ Kitchen & Dining
    17.       ▸ Landscaping
    18.       ▸ Lighting
    19.       ▸ Maintenance & Repairs
    20.       ▸ Moving & Relocating
    21.       ▸ Recycling
    22.       ▸ Storage & Organization
    23.       ▸ Tools & Equipment
    24.       ▸ Zip Codes
    25.       ▸ More Home & Garden
  16. ▸ Law & Ethics
    1.       ▸ Accidents & Personal Injury
    2.       ▸ Administrative Law
    3.       ▸ Birth Certificates
    4.       ▸ Business Law
    5.       ▸ Constitutional Law
    6.       ▸ Criminal Law
    7.       ▸ Cyber Law
    8.       ▸ Education Law
    9.       ▸ Elder Law
    10.       ▸ Employment Law
    11.       ▸ Environmental & Natural Resources Law
    12.       ▸ Ethics & Professional Responsibility
    13.       ▸ Family Law
    14.       ▸ Identity Theft
    15.       ▸ Intellectual Property
    16.       ▸ International Law
    17.       ▸ Legal Research
    18.       ▸ Medical Law
    19.       ▸ Military Law
    20.       ▸ Paralegal Services
    21.       ▸ Procedures & Litigation
    22.       ▸ Real Estate Law
    23.       ▸ Small Claims
    24.       ▸ Sports & Entertainment Law
    25.       ▸ Statute
    26.       ▸ Supreme Court
    27.       ▸ Tax Law
    28.       ▸ Terminology & Meaning
    29.       ▸ Wills & Trusts
    30.       ▸ More Law & Ethics
  17. ▸ News & Events
    1.       ▸ Business News
    2.       ▸ Current Events
    3.       ▸ Journalism & Media
    4.       ▸ Offbeat News
    5.       ▸ Opinion
    6.       ▸ Politics
    7.       ▸ Press Releases
    8.       ▸ Science & Technology News
    9.       ▸ Sports News & Opinion
    10.       ▸ U.S. News
    11.       ▸ Weather
    12.       ▸ World
    13.       ▸ More News & Events
  18. ▸ Pets & Animals
    1.       ▸ Animal Facts & Resources
    2.       ▸ Animal Rights
    3.       ▸ Animal Training & Behavior
    4.       ▸ Aquarium Life
    5.       ▸ Arachnids
    6.       ▸ Birds
    7.       ▸ Cats
    8.       ▸ Crustaceans
    9.       ▸ Dogs
    10.       ▸ Endangered Animals
    11.       ▸ Exotic Pets & Animals
    12.       ▸ Farm Animals
    13.       ▸ Ferrets
    14.       ▸ Fish
    15.       ▸ Gerbils
    16.       ▸ Guinea Pigs
    17.       ▸ Hamsters
    18.       ▸ Horses
    19.       ▸ Household Pets
    20.       ▸ Mammals
    21.       ▸ Pet Health
    22.       ▸ Pet Insurance
    23.       ▸ Pet Mice
    24.       ▸ Pet Monkeys
    25.       ▸ Pet Rats
    26.       ▸ Pet Supplies
    27.       ▸ Pets
    28.       ▸ Rabbits
    29.       ▸ Reptiles & Amphibians
    30.       ▸ Rescue & Adoption
    31.       ▸ Rodents
    32.       ▸ Small Animals
    33.       ▸ Spiders & Insects
    34.       ▸ Turtles
    35.       ▸ Veterinary Medicine
    36.       ▸ Wildlife
    37.       ▸ More Pets & Animals
  19. ▸ Pregnancy & Parenting
    1.       ▸ Adoption
    2.       ▸ Baby Names
    3.       ▸ Child Behavior & Discipline
    4.       ▸ Childbirth & Labor
    5.       ▸ Fatherhood
    6.       ▸ Fertility
    7.       ▸ Fetal Drug & Alcohol Syndrome
    8.       ▸ Motherhood
    9.       ▸ Parenting
    10.       ▸ Pregnancy
    11.       ▸ Special Needs
    12.       ▸ Trying To Conceive
    13.       ▸ More Pregnancy & Parenting
  20. ▸ Professional Counseling
    1.       ▸ Parenting
    2.       ▸ Personality & Emotional Disorders
    3.       ▸ Relationship Issues
    4.       ▸ More Professional Counseling
  21. ▸ Religion & Beliefs
    1.       ▸ Agnosticism
    2.       ▸ Astrology
    3.       ▸ Atheism
    4.       ▸ Buddhism
    5.       ▸ Channeling
    6.       ▸ Christianity
    7.       ▸ Crystals
    8.       ▸ Dream Analysis
    9.       ▸ Fortune Telling
    10.       ▸ Goddesses
    11.       ▸ Graphology
    12.       ▸ Hinduism
    13.       ▸ Islam
    14.       ▸ Judaism
    15.       ▸ Meditation
    16.       ▸ Mental & Spiritual Healing
    17.       ▸ Mysticism
    18.       ▸ New Thought
    19.       ▸ Numerology
    20.       ▸ Occult
    21.       ▸ Paganism
    22.       ▸ Palm Reading (Palmistry)
    23.       ▸ Prophecy
    24.       ▸ Psychic Readings
    25.       ▸ Reincarnation
    26.       ▸ Religious Education
    27.       ▸ Runes
    28.       ▸ Self-Help
    29.       ▸ Spirituality
    30.       ▸ Tarot
    31.       ▸ Theosophy
    32.       ▸ Urantia
    33.       ▸ More Eastern Religions & Philosophies
    34.       ▸ More Religion & Beliefs
  22. ▸ Science & Mathematics
    1.       ▸ Agriculture Science
    2.       ▸ Alternative
    3.       ▸ Archaeology
    4.       ▸ Astronomy & Space
    5.       ▸ Biochemistry
    6.       ▸ Biology
    7.       ▸ Botany
    8.       ▸ Chemistry
    9.       ▸ Earth Sciences & Geology
    10.       ▸ Ecology
    11.       ▸ Engineering
    12.       ▸ Geography
    13.       ▸ Mathematics
    14.       ▸ Oceanography
    15.       ▸ Paleontology
    16.       ▸ Physics
    17.       ▸ Social Sciences
    18.       ▸ Zoology
    19.       ▸ More Science & Mathematics
  23. ▸ Shopping & Style
    1.       ▸ Antiques
    2.       ▸ Appliances
    3.       ▸ Auctions
    4.       ▸ Beauty
    5.       ▸ Books
    6.       ▸ CDs & DVDs
    7.       ▸ Clothing & Accessories
    8.       ▸ Computers & Software
    9.       ▸ Deals, Coupons & Sales
    10.       ▸ Electronics
    11.       ▸ Fashion
    12.       ▸ Gifts
    13.       ▸ Jewelry
    14.       ▸ Kids
    15.       ▸ Lingerie
    16.       ▸ Online Shopping
    17.       ▸ Products
    18.       ▸ Reviews
    19.       ▸ Toys
    20.       ▸ Wholesale
    21.       ▸ More Shopping & Style
  24. ▸ Society & Culture
    1.       ▸ Community Service
    2.       ▸ Cultures & Groups
    3.       ▸ Etiquette
    4.       ▸ Holidays & Observances
    5.       ▸ Languages & Words
    6.       ▸ Royalty
    7.       ▸ More Society & Culture
  25. ▸ Sports & Fitness
    1.       ▸ Ab Workouts
    2.       ▸ Aerobics
    3.       ▸ Alexander Technique
    4.       ▸ Athletes
    5.       ▸ Auto Racing
    6.       ▸ Baseball
    7.       ▸ Basketball
    8.       ▸ Billiards & Pool
    9.       ▸ Bowling
    10.       ▸ Boxing
    11.       ▸ Cheerleading
    12.       ▸ Climbing & Repelling
    13.       ▸ Cricket
    14.       ▸ Cycling
    15.       ▸ Dance
    16.       ▸ Diet
    17.       ▸ Exercise
    18.       ▸ Extreme Sports
    19.       ▸ Fantasy Sports
    20.       ▸ Fencing
    21.       ▸ Fitness
    22.       ▸ Football (American)
    23.       ▸ Football (Australian)
    24.       ▸ Football (Canadian)
    25.       ▸ Football (Soccer)
    26.       ▸ Golf
    27.       ▸ Gymnastics
    28.       ▸ Handball
    29.       ▸ Hip & Thigh Workouts
    30.       ▸ Hockey
    31.       ▸ Horse Racing & Riding
    32.       ▸ Hunting & Fishing
    33.       ▸ Injuries & Rehabilitation
    34.       ▸ Injury Prevention
    35.       ▸ Marathons
    36.       ▸ Martial Arts
    37.       ▸ Motorcycle Racing
    38.       ▸ Nutrition
    39.       ▸ Olympic Sports
    40.       ▸ Olympics
    41.       ▸ Outdoor Recreation
    42.       ▸ Personal Trainers
    43.       ▸ Pilates
    44.       ▸ Pregnancy
    45.       ▸ Quick Workouts
    46.       ▸ Rodeos
    47.       ▸ Rollerskating & Rollerblading
    48.       ▸ Rugby
    49.       ▸ Running & Jogging
    50.       ▸ Skateboarding
    51.       ▸ Softball
    52.       ▸ Sporting Events
    53.       ▸ Sports Announcers
    54.       ▸ Sports Equipment & Accessories
    55.       ▸ Sports History & Trivia
    56.       ▸ Sports Players
    57.       ▸ Sports Teams
    58.       ▸ Sports, Exercise & Fitness For Seniors
    59.       ▸ Stadiums
    60.       ▸ Stretching
    61.       ▸ Tai Chi & Qi Gong
    62.       ▸ Tennis
    63.       ▸ Track & Field
    64.       ▸ Triathlons
    65.       ▸ Volleyball
    66.       ▸ Walking
    67.       ▸ Water Sports
    68.       ▸ Weight Loss
    69.       ▸ Weight Training
    70.       ▸ Winter Sports
    71.       ▸ World Records
    72.       ▸ Wrestling
    73.       ▸ Yoga
    74.       ▸ More Sports & Fitness
  26. ▸ Travel & Leisure
    1.       ▸ Adventure Travel
    2.       ▸ Africa
    3.       ▸ Air Travel
    4.       ▸ Antarctica
    5.       ▸ Argentina
    6.       ▸ Asia Pacific
    7.       ▸ Australia
    8.       ▸ Austria
    9.       ▸ Brazil
    10.       ▸ Bus Travel
    11.       ▸ Camping
    12.       ▸ Canada
    13.       ▸ Car Rental
    14.       ▸ Car Travel
    15.       ▸ Caribbean
    16.       ▸ Cruises
    17.       ▸ Europe (Continental)
    18.       ▸ France
    19.       ▸ Germany
    20.       ▸ Hiking
    21.       ▸ Hotels
    22.       ▸ India
    23.       ▸ Ireland
    24.       ▸ Italy
    25.       ▸ Latin America
    26.       ▸ Mexico
    27.       ▸ Middle East
    28.       ▸ Nepal
    29.       ▸ New Zealand
    30.       ▸ Outdoor Travel
    31.       ▸ RV Travel
    32.       ▸ Spain
    33.       ▸ Specialty Travel
    34.       ▸ Switzerland
    35.       ▸ Time Share
    36.       ▸ Train Travel
    37.       ▸ Travel (General)
    38.       ▸ Travel Agencies
    39.       ▸ Travel Gear
    40.       ▸ Travel Tips
    41.       ▸ Travel Writing
    42.       ▸ United Kingdom
    43.       ▸ United States
    44.       ▸ Vacation
    45.       ▸ Vietnam
    46.       ▸ More Travel & Leisure
  27. ▸ Video Games
    1.       ▸ Arcade Games
    2.       ▸ Kids & Family Games
    3.       ▸ Mac Games
    4.       ▸ Nintendo 3DS
    5.       ▸ Nintendo DS
    6.       ▸ Nintendo Wii
    7.       ▸ PC Games
    8.       ▸ PlayStation 2
    9.       ▸ PlayStation 3
    10.       ▸ PlayStation Portable (PSP)
    11.       ▸ Xbox 360
    12.       ▸ More Video Games