Win a Ticket to Front End Conference

We have one free ticket for a lucky winner to http://frontenddesignconference.com/ for a lucky winner.

To enter the drawing Tweet “I wanna go to http://frontenddesignconference.com/ in Florida. Follow @estellevw and retweet to win. http://awe.sm/58TY1 or something more imaginative, with a link to this post. One lucky retweeter / follower will be selected from the group of retweeters on Sunday night.

Here is more on the conference:
7 Awesome Speakers
July 23, 2010
A single day design conference focused on content, presentation and behavior.
Register Now for $129

Oh, and if you want to beg, you can do so in the comments.

Microdata

Microdata let you create your own vocabularies beyond HTML5 and extend your web pages with custom semantics. Microdata uses the new to HTML5 attributes of itemscope, itemprop, itemref and itemtype. The itemscope attribute is used create an item. The itemprop attribute is used to add a property to an item. If an itemprop has associated properties that are not descendants of that itemprop, you can associate those properties with that itemprop by using the itemref attribute: the entity that has the itemscope attribute also accepts the itemref attribute that takes as it’s value a space separated list of id’s of entities that should be crawled in addition to the itemprop’s descendants.

Microdata is most useful when it is used in contexts where other authors and readers are able to cooperate to make new uses of the markup. You can create your own types of microdata markup marked up on a page that doesn’t expect its microdata to be re-used. Use the itemtype attribute to provide a URI. There doesn’t need to be anything at that URI, but all of the itemscopes of the same itemtype should reference the same URI. It is most useful, however, to not create your own vocabulary if one exists for a similar purpose. There are several microdata vocabularies that have been standardized that coincide with Microformat conventions.

Microformats are very similar to microdata. In fact, microdata can be viewed as an extension of the existing microformat idea that attempts to address the deficiencies of microformats without the complexity of systems such as RDFa. Instead of using the new itemscope, itemprop, itemtype, etc. attributes, Microformats repurpose the class attribute to provide human and machine readable semantic meaning to data, microdata

Microformats are standardized sets of vocabularies that are both human and machine-readable. They are web page conventions used to describe common information types including events, reviews, address book information and calendar events. Each entity, such as a person, event or business, has its own properties, such as name, address and phone number.

In general, microformats use the class attribute in opening HTML tags (often <span> or <div>) to assign brief, descriptive names to entities and their properties. Unlike Microdata, Microformats are NOT part of the HTML5 specification.

Here’s an example of a short HTML block showing my contact information for me.

<ul>
<li><img src="http://standardista.com/images/estelle.jpg" alt="photo of Estelle Weyl "/></li>
<li><a href="http://www.standardista.com">Estelle Weyl</a></li>
<li>1234 Main Street<br />
San Francisco, CA 94114</li>
<li>415.555.1212</li>
</ul>

Here is the same HTML marked up with the hCard (person) microformat.

<ul id="hcard-Estelle-Weyl" class="vcard">
<li><img src="http://standardista.com/images/estelle.jpg" alt="photo of Estelle Weyl" class="photo"/></li>
<li><a class="url fn" href="http://www.standardista.com">Estelle Weyl</a></li>
<li class="adr">
<span class="street-address">1234 Main Street</span>
<span class="locality">San Francisco</span>, <span class="region">CA</span>, <span class="postal-code">94114</span> <span class="country-name hidden">USA</span>
</li>
<li class="tel">415.555.1212</li>
</ul>

In the first line, class="vcard" indicates that the HTML enclosed in the <ul> describes a person: in this case, me. The microformat used to describe people is called hCard but is referred to in HTML as vcard. While confusing, it isn’t a typo.

The rest of the example describes properties of the person, including a photo, name, address, URL and phone, with each property having a class attribute describing the property. For example, fn describes my full name.
Properties can contain other properties. In the example above, the property adr encompasses all components of my fake address including street-address, locality, region and postal-code. With a little CSS we can hide the ‘hidden’ class and add a line break between street-address and locality. To create your own hcard, visit http://microformats.org/code/hcard/creator

The same content could be written with microdata:

<ul id="hcard-Estelle-Weyl" itemscope itemtype="http://microformats.org/profile/hcard">
<li><img src="http://standardista.com/images/estelle.jpg" alt="photo of Estelle Weyl" class="photo"/></li>
<li><a href="http://www.standardista.com" itemprop="fn">Estelle Weyl</a></li>
<li itemprop="adr">
<span itemprop="street-address">1234 Main Street</span>
<span itemprop="locality">San Francisco</span>, <span itemprop="region">CA</span>, <span itemprop="postal-code">94114</span> <span class="hidden" itemprop="country-name">USA</span>
</li>
<li itemprop="tel">415.555.1212</li>
</ul>

Or you can combine the two:

<ul id="hcard-Estelle-Weyl" class="vcard" itemscope itemtype="http://microformats.org/profile/hcard">
<li><img src="http://standardista.com/images/estelle.jpg" alt="photo of Estelle Weyl" class="photo"/></li>
<li><a class="url fn" href="http://www.standardista.com" itemprop="fn">Estelle Weyl</a></li>
<li class="adr" itemprop="adr">
<span class="street-address" itemprop="street-address">1234 Main Street</span>
<span class="locality" itemprop="locality">San Francisco</span>, <span class="region" itemprop="region">CA</span>, <span class="postal-code" itemprop="postal-code">94114</span> <span class="country-name hidden" itemprop="country-name">USA</span>
</li>
<li class="tel" itemprop="tel">415.555.1212</li>
</ul>

http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#microdata provides information about microdata.

Search engines will not display content that is not visible to the user. Providing search engines with more detailed information, even if you don’t want that information to be seen by visitors to your page, can be helpful. Event time in ISO data format helps ensure that events are placed in the right time sequence and correctly placed in calendars. Providing geo coordinates of latitude and longitude can help ensure correct mapping. Providing semantics around reviews provides Google with added meta data that it can use to better display your search results leading to a higher click thru rate.

To enable the web to be a single global database, being able to parse the available data into meaningful data points is required. Microdata and microformats help make otherwise non-descript data meaningful to parsers.

HTML5 Input Attributes & Browser Support

I have updated the HTML5 Web Form Browser support grid to include the various input attributes, for what input type each is relevant, and which browsers support each attribute for each type.

TYPE ⇒

Attribute

Text, search, url, tel Email Password Dateandtime
Date,
Month,
Week,
Time
Dateandtime-local,
number
range color Checkbox, radio file
accept WK, O,
FF, IE
autocomplete O O O O O O O
autofocus WK, O WK, O WK,O WK, O WK, O WK, O WK, O WK, O
checked WK, O,
FF, IE
disabled WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
Form O O O O O O O O
list WK, O WK, O WK, O WK, O WK, O WK, O
max O, WK O, WK O, WK
maxlength WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
min O, WK O, WK O, WK
multiple FF, WK, IE FF, WK
Name WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O, FF, IE WK, O,
FF, IE
WK, O,
FF, IE
pattern WK, O WK, O WK, O
placeholder WK WK WK
readonly WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
required WK, O WK, O WK, O WK, O WK, O WK, O WK, O
size WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
step O, WK O, WK O, WK
checked WK, O,
FF, IE
value WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O,
FF, IE
WK, O, FF, IE WK, O,
FF, IE
WK, O,
FF, IE
  • WK = Webkit (tested Safari 5)
  • O = Opera (10.5 on Mac)
  • FF = Firefox (3.6.3 on Mac)
  • IE = Internet Explorer (IE8 on XP)

Browsers that don’t support the type attribute may still support other attributes in the input as the browser may support attributes on the text input type (such as maxlength or size), and will therefore support those attributes on a type it doesn’t support, as the input will default to text type. For example, while IE and FF don’t currently support the email type, they do support the multiple attribute on that type, since they will accept a text type including space separated email addresses.

Resources for this effort include:

Converting from HSL to RGB() & Hexadecimal Colors

I created a ‘spreadsheet’ of the HSL() (hue, saturation, lightness) colors. I noticed if you inspect the file in Firebug, the left hand console gives you the rgb() color, and the right hand inspector gives you the hexadecimal #RRGGBB color.

To translate a color from HSL() to RGB() or #FFF, visit the HSL() ‘spreadsheet’ and inspect the color in Firebug. Simple as that.

Of course, you don’t have to use my spreadsheet. Simply declare an inline hsl() value on a div in your own sandbox. Inspecting it in Firebug will give you both the rgb() value (in the left hand firebug console, inline on the element) and in the right hand console, under element.style{} in the style console.

CSS Color Formats and HSL

Prior to CSS3, we had 3 types of color formats: there was the hexadecimal format (and shorthand hex format), rgb() format and named colors. CSS3 adds support for HSL, HSLA and RGBA. Here are the formats we have in CSS3:

Color Syntax Example Definition
#RRGGBB #FF00FF hexadecimal format (tutorial)
#RGB #F0F shorthand hexadecimal format
rgb(r,g,b) rgb(255, 0, 255) red, green blue (tutorial)
hsl(h,s,l) hsl(300, 100%, 50%) hue, saturation, lightness
cmyk(c,m,y,k) cmyk(29%, 55%, 0, 0) Cyan, Magenta, Yellow, Black
hsla(h,s,l,a) hsla(300, 100%, 50%, 1) hue, saturation, lightness, opacity
rgba(r,g,b) rgba(255, 0, 255, 1) red, green, blue, opacity
named colors fuchsia see color name tutorial
transparent transparent no color (transparent)
currentColor currentColor color of the text for that element

In part I we discussed #RRGGBB, #RGB, rgb(), rgba() and touched upon HSL and HSLA colors. In this section we go further into HSLA, and discuss the new keyterm currentColor, and the color type that didn’t make it into the CSS3 specifications: flavor.

Hue, Saturation and Lightness

HSL stands for hue, saturation and lightness. The hue value in included in degrees from 0 to 359, with percentages for saturation and lightness, with 50% being the norm for lightness and 100% being the norm for saturation.

Lightness of 0% will be white, 50% will be the actual hue, and 100% will be black. Saturation of 100% will be the hue, and saturation of 0 will give you a shade of gray from white to #808080 to black depending on the lightness.

Values for hues include: 0 = red, 60 = yellow, 120 = green, 180 = cyan, 240 = blue, 300 = magenta, and everything in between. Each table below represents one hue. Twelve equally spaced colors (i.e.
at 30° intervals) have been chosen from the color circle: red,
yellow, green, cyan, blue, magenta, with all the intermediate colors (the
last is the color between magenta and red).

The X axis of each table represents the saturation (100%, 75%, 50%,
25%).

The Y axis represents the lightness. The higher the percent, the lighter the color is, the lower the percent, the darker, with 50% being ‘normal’. 100% lightness has been omitted from the tables below, since it’s always white, no matter the hue. Similarly, 0% lightness has been omitted, since it always renders black, no matter the hue.

0° (Red)

Saturation
100%

75%

50%

25%

88

hsl(0, 100%, 88%)
75

hsl(0, 75%, 75%)
63 hsl(0, 100%, 63%) hsl(0, 75%, 63%) hsl(0, 50%, 63%) hsl(0, 25%, 63%)
50 hsl(0, 100%, 50%) hsl(0, 75%, 50%) hsl(0, 50%, 50%) hsl(0, 25%, 50%)
38

25
13 hsl(60, 100%, 13%) hsl(60, 75%, 13%) hsl(60, 50%, 13%) hsl(60, 25%, 13%)
30° (Orange)

Saturation
100%

75%

50%

25%

88

hsl(30, 100%, 88%) hsl(30, 75%, 88%) hsl(30, 50%, 88%) hsl(30, 25%, 88%)
75

hsl(30, 100%, 75%) hsl(30, 75%, 75%) hsl(30, 50%, 75%) hsl(30, 25%, 75%)
63 hsl(30, 100%, 63%)
50 hsl(30, 100%, 50%)
38

hsl(30, 100%, 38%)
25 hsl(30, 100%, 25%)
13 hsl(30, 100%, 13%) hsl(30, 25%, 13%)
60° (Yellow)

Saturation
100%

75%

50%

25%

88

hsl(60, 100%, 88%) hsl(60, 75%, 88%) hsl(60, 50%, 88%) hsl(60, 25%, 88%)
75

hsl(60, 100%, 75%) hsl(60, 75%, 75%) hsl(60, 50%, 75%) hsl(60, 25%, 75%)
63 hsl(60, 100%, 63%) hsl(60, 75%, 63%) hsl(60, 50%, 63%) hsl(60, 25%, 63%)
50 hsl(60, 100%, 50%) hsl(60, 75%, 50%) hsl(60, 50%, 50%) hsl(60, 25%, 50%)
38

hsl(60, 100%, 38%) hsl(60, 75%, 38%) hsl(60, 50%, 38%) hsl(60, 25%, 38%)
25 hsl(60, 100%, 25%) hsl(60, 75%, 25%) hsl(60, 50%, 25%) hsl(60, 25%, 25%)
13 hsl(60, 100%, 13%) hsl(60, 75%, 13%) hsl(60, 50%, 13%) hsl(60, 25%, 13%)
90° Yellow-Green
Saturation
100% 75% 50% 25%
88 hsl(90, 100%, 88%)
75 hsl(90, 25%, 75%)
63 hsl(90, 100%, 63%) hsl(90, 75%, 63%) hsl(90, 50%, 63%) hsl(90, 25%, 63%)
50 hsl(90, 100%, 50%) hsl(90, 25%, 50%)
38 hsl(90, 25%, 38%)
25 hsl(90, 10%, 25%) hsl(90, 75%, 25%) hsl(90, 50%, 25%) hsl(90, 25%, 25%)
13 hsl(90, 25%, 13%)
120° (Green)

Saturation
100%

75%

50%

25%

88

hsl(120, 100%, 88%) hsl(120, 25%, 88%)
75 hsl(120, 25%, 75%)
63 hsl(120, 25%, 63%)
50 hsl(120, 100%, 50%) hsl(120, 25%, 50%)
38 hsl(120, 100%, 38%) hsl(120, 75%, 38%) hsl(120, 50%, 38%) hsl(120, 25%, 38%)
25 hsl(120, 25%, 25%)
13 hsl(120, 25%, 13%)
150° Green-Cyan

Saturation
100% 75% 50% 25%
88

hsl(150, 100%, 88%) hsl(150, 75%, 88%) hsl(150, 50%, 88%) hsl(150, 25%, 88%)
75 hsl(150, 100%, 75%) hsl(150, 75%, 75%) hsl(150, 50%, 75%) hsl(150, 25%, 75%)
63 hsl(150, 100%, 63%) hsl(150, 75%, 63%) hsl(150, 50%, 63%) hsl(150, 25%, 63%)
50 hsl(150, 100%, 50%) hsl(150, 75%, 50%) hsl(150, 50%, 50%) hsl(150, 25%, 50%)
38 hsl(150, 100%, 38%) hsl(150, 75%, 38%) hsl(150, 50%, 38%) hsl(150, 25%, 38%)
25 hsl(150, 100%, 25%) hsl(150, 75%, 25%) hsl(150, 50%, 25%) hsl(150, 25%, 25%)
13 hsl(150, 100%, 13%) hsl(150, 75%, 13%) hsl(150, 50%, 13%) hsl(150, 25%, 13%)
180° (Cyan)

Saturation
100% 75% 50% 25%
88

hsl(180, 100%, 88%) hsl(180, 50%, 88%) hsl(180, 25%, 88%)
75 hsl(180, 75%, 75%) hsl(180, 25%, 75%)
63 hsl(180, 100%, 63%) hsl(180, 50%, 63%) hsl(180, 25%, 63%)
50 hsl(180, 100%, 50%) hsl(180, 75%, 50%) hsl(180, 25%, 50%)
38 hsl(180, 100%, 38%) hsl(180, 50%, 38%) hsl(180, 25%, 38%)
25 hsl(180, 75%, 25%) hsl(180, 25%, 25%)
13 hsl(180, 100%, 13%) hsl(180, 50%, 13%) hsl(180, 25%, 13%)
210° Cyan-Blue

Saturation
100% 75% 50% 25%
88

hsl(210, 100%, 88%) hsl(210, 75%, 88%) hsl(210, 50%, 88%) hsl(210, 25%, 88%)
75 hsl(210, 75%, 75%) hsl(210, 25%, 75%)
63 hsl(210, 100%, 63%) hsl(210, 50%, 63%) hsl(210, 25%, 63%)
50 hsl(210, 100%, 50%) hsl(210, 75%, 50%) hsl(210, 25%, 50%)
38 hsl(210, 100%, 38%) hsl(210, 50%, 38%) hsl(210, 25%, 38%)
25 hsl(210, 75%, 25%) hsl(210, 25%, 25%)
13 hsl(210, 100%, 13%) hsl(210, 50%, 13%) hsl(210, 25%, 13%)
240° (Blue)

Saturation
100% 75% 50% 25%
88

hsl(240, 100%, 88%) hsl(240, 25%, 88%)
75 hsl(240, 100%, 75%) hsl(240, 75%, 75%) hsl(240, 50%, 75%) hsl(240, 25%, 75%)
63 hsl(240, 25%, 63%)
50 hsl(240, 100%, 50%) hsl(240, 25%, 50%)
38 hsl(240, 100%, 38%) hsl(240, 75%, 38%) hsl(240, 50%, 38%) hsl(240, 25%, 38%)
25 hsl(240, 25%, 25%)
13 hsl(240, 25%, 13%)
270° Blue-Magenta

Saturation
100% 75% 50% 25%
88

hsl(270, 100%, 88%) hsl(270, 75%, 88%) hsl(270, 50%, 88%) hsl(270, 25%, 88%)
75 hsl(270, 25%, 75%)
63 hsl(270, 25%, 63%)
50 hsl(270, 100%, 50%) hsl(270, 25%, 50%)
38 hsl(270, 25%, 38%)
25 hsl(270, 25%, 25%)
13 hsl(270, 100%, 13%) hsl(270, 75%, 13%) hsl(270, 50%, 13%) hsl(270, 25%, 13%)
300° (Magenta)

Saturation
100% 75% 50% 25%
88

hsl(300, 100%, 88%) hsl(300, 75%, 88%) hsl(300, 50%, 88%) hsl(300, 25%, 88%)
75 hsl(300, 100%, 75%) hsl(300, 75%, 75%) hsl(300, 50%, 75%) hsl(300, 25%, 75%)
63 hsl(300, 100%, 63%) hsl(300, 75%, 63%) hsl(300, 50%, 63%) hsl(300, 25%, 63%)
50 hsl(300, 100%, 50%) hsl(300, 75%, 50%) hsl(300, 50%, 50%) hsl(300, 25%, 50%)
38 hsl(300, 100%, 38%) hsl(300, 75%, 38%) hsl(300, 50%, 38%) hsl(300, 25%, 38%)
25 hsl(300, 100%, 25%) hsl(300, 75%, 25%) hsl(300, 50%, 25%) hsl(300, 25%, 25%)
13 hsl(300, 100%, 13%) hsl(300, 75%, 13%) hsl(300, 50%, 13%) hsl(300, 25%, 13%)
330° Magenta-Red

Saturation
100% 75% 50% 25%
88

hsl(330, 100%, 88%) hsl(330, 25%, 88%)
75 hsl(330, 25%, 75%)
63 hsl(330, 25%, 63%)
50 hsl(330, 100%, 50%) hsl(330, 25%, 50%)
38 hsl(330, 100%, 38%) hsl(330, 75%, 38%) hsl(330, 50%, 38%) hsl(330, 25%, 38%)
25 hsl(330, 100%, 25%) hsl(330, 75%, 25%) hsl(330, 50%, 25%) hsl(330, 25%, 25%)
13 hsl(330, 25%, 13%)

There is a grid with many more colors at Standardista.com if you want to see how more hsl combinations render and have a browser that supports HSL rendering. The grid above is coded with hexadecimal colors, since internet explorer does not understand HSL colors. The grids at http://standardista.com/sandbox/hsl.php require Opera, Safari, Firefox, Chrome or IE9 to view.

HSLA

Similar to rgb() with rgba(), hsl() also has an alpha transparent call, hsla(). The syntax is hsla, followed by hue in degrees, saturation in percentage, lightness in percentage and alpha value from 0-1, encompassed in parenthesis.

For example: hsla(300, 100%, 50%, 0.5) is magenta at 50% opacity.

Introducting CSS3 Colors

Defining colors in red, green and blue is supported by CSS3 in several ways.

Hexadecimal Values

You can declare the hexadecimal value of your red, green and blue with hexadecimal values ranging from 0 to 255 in the format of 00 to FF, put the three together preceded by a hash (#), and that’s the color. For example, #FFFFFF for complete saturation of red, green and blue comes out white, #000000 for lack of any color comes out black. A mix and match of hexadecimal values from 0-255 using any two characters A-F0-9, case insensitive, for the red green and blue values, combined together in the order of red, green and blue can create millions of colors.

Did I mention case-insensitivity? It doesn’t matter if you use #FFCC00 or #ffcc00 – the value syntax is case insensitive.

The RGB hexadecimal notation also has a shorthand, of #RGB, where the R, G, and B are a single character, A-F0-9, case insensitive, put together, preceded by a hash mark. Identical to the long format, the browser expands the RGB value, such as #369 to #336699.

All browsers support all of the hexadecimal values, both short hand and long hand. There used to be a discussion of web-safe colors. Web face colors has been a non-issue, even for hand held devices. It is safe to use any color combination (may not be pretty or legible, but it will render).

rgb() syntax

Instead of using the hexadecimal values for RGB, you can use the base 10 value for your mix of red, green and blue, or even percentages. Instead of preceding your color with a hash tag, the syntax is the keyterm ‘rgb’ follow by your comma-separated values in parenthesis.

#FFFFFF = #FFF = rgb(255, 255, 255) = rgb(100%, 100%, 100%).

All browsers support all of the RGB color combinations in general. Some browsers allow the mixing of rgb() numbers with percents, but the specifications clearly state that this is not expected behavior, and not all browsers support it, so avoid mixing value types.

What’s new?

New in CSS3 is RGBA. RGBA is similar to RGB, but with an added A for AlphaTransparency. The rgb() specifications were extended in CSS3 to include ‘alpha’ to allow specification of the opacity of a color. The first three values are still red, green, blue. Thee fourth value is the opacity level, 1 being fully opaque, 0 being fully transparent, and any float being everything in-between.

rgb(255, 255, 255) = rgb(100%, 100%, 100%) = rgba(255, 255, 255, 1)

The above are all equal to white, since 1 means fully opaque. But don’t get confused: rgba(0,0,0,0) is transparent, not black, because the level of opacity is none.

Unlike RGB, there is no hexadecimal notation for RGBA. Unlike RGB, the IEs don’t understand RGBA. IE8 correctly ignores properties with rgba() in the value. IE6 and IE7 overwrite values, without understanding them, and generally inherit the default value when confused.

RGBA is going to be extremely useful as drop shadows on boxes and text become better supported. While it is very common to see text-shadow: 3px 3px 3px #CCCCCC; or text-shadow: 3px 3px 3px #000000;— including a gray or black shadow, the effect looks much better if you write text-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4); While the color #CCCCCC and rgba(0,0,0,0.4) look similar when solid over a white background, when included as a shadow, the #CCCCCC starts off as a solid grey, which looks a little off. The RGBA color is always translucent, which looks MUCH better.

Hue, Saturation and Lightness

HSL stands for hue, saturation and lightness. The HSL format simplifies color palette creation as you can pick a hue as the base, then manipulate the lightness/darkness and saturation of the hue selected.

HSL is a new color type added in CSS3, standing for hue, saturation and lightness. The syntax is similar to rgb(), but instead of including the values for red, green and blue, the color value accepts values in degrees from 0 to 359 for hue, and percentages for saturation and lightness, with 50% being the norm for lightness and 100% being the norm for saturation.

Lightness of 0% will be white, 50% will be the actual hue, and 100% will be black. Saturation of 100% will be the hue, and saturation of 0 will give you a shade of gray from white to #808080 to black depending on the lightness.

Up Next

In part 2, we’ll cover hsl and hsla in greater depth.

Making IE recognize HTML5 elements

IE6, IE7 and IE8 don’t recognize the HTML elements. This causes a major problem when you’re using the HTML5 elements, such as ‘aside’, as part of (or your complete) selector in your CSS. Add this snippet either in your HTML or as a condionally included file, and IE will be able to handle your HTML5 elements as selectors in your CSS, and as members of your DOM in javascript. (thanks to John Resig for the inspiration)

<!--[if IE]>
<script type="text/javascript">
(function(){
var html5elmeents = "address|article|aside|audio|canvas|command|datalist|details|dialog|figure|figcaption|footer|header|hgroup|keygen|mark|meter|menu|nav|progress|ruby|section|time|video".split('|');
for(var i = 0; i < html5elmeents.length; i++){
document.createElement(html5elmeents[i]);
}
}
)();
</script>
<![endif]-->

Printing HTML5 in Internet Explorer: where HTML5 is not supported

The code snipped above does wonders for enabling the various Internet Explorer’s to understand HTML5 elements as element selectors for scressn media, it does nothing to enable print CSS. The above javascript doesn’t cure the ‘print’ issue. Jonathan Neal has come up with a javascript solution to the IE HTML5 print issue.

IE Print Protector is a javascript file that allows you to print HTML5 pages in Internet Explorer, helping IE render HTML5 elements correctly, both on screen and in print.

IE8: The Good: CSS 2.1 Selector Support in Internet Explorer

Internet Explorer 8, IE8, was released on March 19, 2009. Depending on your statistics source, as of July 2009, IE8 already has 17.8% of the browser market share. In the last section we provided an overview of what is new, good, bad and different in IE8. In this article, we take a deeper look at CSS 2.1 support in the IE8 browser, and compare IE8’s CSS support to IE6 and IE7.

CSS 2.1 Support

As mentioned in the overview, IE8 has complete support for CSS2.1. IE8 is the first browser to support all of the W3C CSS2.1 specifications, and currently has the best support of any browser (including Firefox, Safari and Opera) of the CSS 2.1 specifications. One may think (though no one outside of Microsoft does) that this makes IE8 the best browser, but it doesn’t. IE8 may be the first IE to support CSS 2.1, but Firefox, Safari, and Opera have already moved on to supporting features proposed in CSS3.

Internet Explorer 8 supports all CSS 2.1 Selectors

By having complete support for CSS 2.1, IE8 has a lot of improvements over IE7 and IE6 in terms of CSS support. Below are listed all the individual CSS2.1 selectors, with a brief explanation of how IE6, IE7 and IE8 compare. You’ll note that IE8 supports ALL of the selectors listed. While not shown in this grid, Firefox, Opera and Safari all support all the CSS 2.1 selectors, and have been doing so since previous releases.

By having complete support for CSS 2.1, IE8 has a lot of improvements over IE7 and IE6 in terms of CSS support. Let’s look at the differences:

Browser
Pattern Meaning IE6 IE7 IE8
E:active

E:hover

E:focus

Dynamic pseudo-classes are generally thought to be applicable to links and form elements since IE6 and IE7 don’t support them on other elements. IE8 supports pseudo classes correctly on ALL the elements.

Δ Δ
Δ Δ
Χ Χ
E:before

E:after

The ‘:before’ and ‘:after’ pseudo-elements can be used to insert generated content before or after an element’s content. Completely ignored by IE6 and IE7, it is supported by IE8. See generated content

Χ Χ
Χ Χ
*

Universal Selector: any element *{}. While all browsers support this selector, it’s best to use it sparingly if at all.

E

Type or Element selector: a specific element, such a p, td, ol {}

.class

Class selector: a class or several classes, such as: .myClass {}

IE6 does not support dual class names. For example, .one.two {} will target <p class="one two"> in all modern browsers, except IE6, which ignores it. Except for this exception, class selectors are supported by all browsers.

Δ
#id

ID Selector: Matches an element based on it’s ID: #myId {} Supported by all browsers

E F

Descendant selector: Matches any element F that is a child of element E

E > F

Child Combinator: Matches element F that is the first element child of element E

Χ
E + F

Adjacent simbling selector: Matches element F that is a the next sibling of element E. label input {} will match any input that follows a label such as <label>a label</label><input type="text">.

Note that there is a sibling selector – E~F – in CSS3 that is supported by IE7 and IE8, but not IE6

Χ
E[attr]

Attribute Selector: Matches if the element matched has the attribute: input[type] {}.

The exception to the support is that the browsers won’t match the element that has the attribute if the attribute value is empty

Χ
E[attr=val]

Attribute Selector: Matches if the element matched has the attribute: input[type=checkbox] {}.

Χ
E[attr~=val]

Attribute Selector: Matches if the element matched has the value of the attribute value: a[rel~=nofollow] {} should match <a href="..." rel="noindex nofollow">.

Χ Δ
E[attr|=val]

Attribute Selector: Matches if the element matched has the attribute with the value has atleast the val as part of the value: div[lang|=en] should match <div lang="en-us">

Χ Δ
E :first-child

The CSS selector should match the inner div element, because it is the first child of the outer div element Comments are not elements, so they should not be considered when determining the first child.

Χ Δ
E:link

Non visited link (non included above with pseudo classes since only links can be links)

E:visited

Visited link (not included above with pseudo classes since only links can be visited)

E:lang()

Matches element of type E if it is in (human) language c (the document language specifies how language is determined).

Χ Χ
E:first-letter

First letter pseudo-element: Matches the first letter of the element E.

E:first-line

First-line pseudo-element: Applicable to block-level elements, inline-block, table-caption or a table-cell, targets the contents of the first formatted line of a element.

Note that Opera 9.6, Firefox and Safari all support all of the above CSS selectors.

Legend
Full Support
Χ No Support
Δ Some support, but not full support

IE support of :hover pseudoclass

The :hover pseudo-class enables you to alter the presentation of an element when the user mouses over the element. For example, similar to Excel, you can change the color of a table row when the user mouses over a table rows using only CSS. IE6 and IE7, only support the :hover pseudoclass on links (the <a> tag) and some form elements. One very popular use of the hovering is drop down menus. In the past, because of IE6 and IE7, javascript had to be added to make sub-navigation appear on hover in those browsers. IE8, like all other standards compliant browsers, now supports the :hover pseudoclass on all displayed elements.

IE support of :before and :after pseudo-elements

The :before and :after pseudo elements enable you to add content before and/or after specified elements. For example, you can add special characters in front of list items, thereby not limiting yourself to the limited number of default list-style-types. IE6 and IE7 have no support for these pseudo-elements. IE8, however, has fully compliant support for these pseudo-elements. In fact, IE8 has better support for the content property of these pseudo elements than any other browser: better support even than Firefox.

Using differences in CSS selctor support to target browsers

Users of Community MX are encouraged to use conditional comments to target different versions of Internet Explorer. You can also use CSS selectors to target specific browsers. IE6 and IE7 have limited support for CSS 2.1 selectors. IE8 supports all of CSS 2.1 selectors, but very limited support fo CSS 3 selectors. On the other hand, all other non-IE grade-A browsers have support of several CSS 3 selectors. You can use these difference to your advantage to target specific browsers. In the last section, we provided one hack:

p.myclass {
color: green; /* all browsers */
}
body:first-child p.myclass { /* IE8 and all CSS 2.1 compliant browsers */
color: blue;
} body:last-child p.myclass { /* CSS 3 supportive browsers */
color: red;
}

This IE8 CSS filter targets all browsers with a regular element.className selector to target all paragraphs with the myClass class. It then targets all CSS2 compliant browsers with the CSS2.1 pseudo-class. It then filters out IE8 but using CSS3 to target all modern, non-IE browsers. It’s best not to use it, but it is important to understand how CSS can be used to filter browsers so you can follow other people’s code.

Up Next

In this section of IE8: the good, the bad, the ugly (and pretty), we’ve covered IE Support for CSS selectors. In the next section wel will look at IE’s support of CSS 2.1 properties and values of interest.

::before and ::after: Generating Content

In this section we learn about the different types of content that we can generated with CSS using the content property and its various value types. You’ve likely only touched upon the CSS content property, adding a simple string before or after an element. The content property can take many more values that just a simple string: you can add text, images, quotes, special characters, even images to your page using the content property to generate content in your :before and :after pseudo-elements. In this section we take a deeper look into the various values of the CSS content property.

Generated content is now supported in IE8 and all other modern browsers, so it makes sense to learn. There is an archaic table of browser support for the various values of the content property below (see listing 8).

Values of the CSS content property

The CSS content property can take as its value

  • none
  • normal
  • <string>
  • url
  • open-quote
  • close-quote
  • no-open-quote
  • no-close-quote
  • attr(attribute)
  • counter(name[, style]).

In this section of the series, we will discuss all of these values. We will only touch upon attr(attribute) and counter(name) in this section, as we will dive deeply into those two value options in the next section of this series..

Definition and purpose of each value of the content property

The CSS content property can take as its value none | normal | <string> | url | open-quote | close-quote | no-open-quote | no-close-quote | attr(attribute) | counter(name[, style]). Values have the following meanings:

  • content: none;

    none: When content: none; is included, the pseudo-element is not generated. This does NOT work in the current version of Safari (or Opera), nor is it expected to be supported in the next release of Safari. The solution to fix this which works in all modern browsers is to define the value as an empty string: content: "";. The two quotes with no content between the quotes is called an empty string. For example, some browsers automatically add opening and closing quotes to the <q> element. To override this default presentation, include q {content: "";} instead of q {content: none;}, so that all browsers override the default <q> presentation.

  • content: normal;

    normal: The ‘normal’ value, according to the W3C specifications, is supposed to “compute to ‘none’ for the :before and :after pseudo-elements.” To me, this specification is unclear. Is it supposed to compute to ‘none’ unless the default browser rendering includes content? The only element where interpretation of this value is relevant is the <q> or ‘quote’ element. In this case, the ‘normal’ value is handled differently in different browsers. Safari and Opera show the default content of quotes encompassing the text in between the opening and closing <q> tags. IE8 and Firefox do not show the quotes: computing to ‘none’. In the grid of support below I put support for Safari and none, and Opera as ‘iffy’, since my take is that Opera misinterpreted the deflation: Opera does compute to ‘none’ for most elements, but leaves quotes around the <q>, which is “normal”, but not the correct value for ‘normal’ according to the W3C.

  • content: "Estelle: ";
    content: "\00a3 "; /* includes '£' */

    string: The values of content can be a string encompassed in quotes. Including a string value will add your string before or after the element (depending on which pseudo-element is used). Strings can either be written with double or single quotes: the opening quote needs to be the same type of quote as the closing quote.

    If your string includes a quotation mark, make sure you escape it with a back slash. Otherwise, you can generally include any keyboard character. If you are putting a string of text, you may want to include a space in your text. You can also generate this spacing using CSS. Remember, as we learned in section 32, you can use CSS to stylize your generated text even though the generated text is NOT added to the pages document tree.

    Advanced topic: If you are going to include any non-ASCII characters or entities, declare the charset in your CSS and XHTML, and/or use the ISO / IEC 8859-1 (a.k.a. Latin-1) code for the character. Check out my blog post on including named entities in CSS and Javascript for examples and instructions.

  • content: url(myBullet.gif);

    url: You can add images as generated content (and even sound as generated content for auditory pages), by linking the content to an online file. To include an external file as generated content, include the URI inside the “url()”. The value of the property in this case it a path and file name that designates an external resource, such as an image, inside the “url()” as demonstrated above. If the browser can’t display the resource, FireFox and Internet Explorer 8 omit the file completely, as if it were not specified. Safari, on the other hand, indicates that the resource cannot be displayed with a missing image icon.

  • content: open-quote;

    open-quote and close-quote: These values are replaced by the appropriate string from the ‘quotes’ property. When including nested quotes, if the outer quotes are double quotes, generally, in literature, the inner quotes should be single quotes. The values of open-quote and close-quote are supposed to handle that scenario, but it doesn’t work cross browser. Firefox and Internet Explorer get these values right. Opera handles this, adding quotes, but does not nest quotes correctly. Safari ignores these values completely. Until Safari handles the open-quote and close-quote, values, I recommend using doing a double declaration. The first declaration should be a string with an escaped quote of your choosing. The second declaration should use the key terms of open-quote or close-quote, so the browsers that understand the declaration can nest correctly.

    p.quote:before {
       content: "\"";
       content: open-quote;
    }

    Listing 1: The first line in understood by all browsers supporting content, since all browsers support the string value. If a browser does not understand the “open-quote” value, the browser ignores the value and inherits the string value from line 1.

  • content: no-open-quote;

    no-open-quote and no-close-quote: Introduces no content, but increments ( or decrements) the level of nesting for quotes. As mentioned in the open-quote/close-quote section above, when quotes are nested in some languages, the type of quotation mark used changes depending on the level of nesting. This is when these values are relevant. Again, safari ignores the declaration. Opera, Internet Explorer 8 and Firefox get it right (though Opera doesn’t nest properly. The trick described in Listing 1 works here too, except serve an empty string, as in listing 2.

    p.quote:before {
       content: "";
       content: no-open-quote;
    }

    Listing 2: The first line in understood by all browsers supporting content, since all browsers support the string value. If a browser does not understand the “no-open-quote” value, the browser ignores the value and inherits the empty string value from line 1.

  • content: attr(title);

    attr(x): This ‘function’ returns as the content value a string with the value of the X attribute of the element on which the content attribute is applied. The attribute value will be elaborated on in the next section.

  • content: counter(subtitles, decimal);
    content: counter(headers) "." counter(subtitles) ": ";

    counter(name) or counter(name, style): The counter takes two parameters: the name, which you can reference to increment or reset, and the style, which, if not declared, defaults to “decimal”. While you can name the counter almost anything except ‘none’, ‘inherit’ or ‘initial’, avoid key terms. Counter will be elaborated on in the next section.

*By “modern browsers” I mean all browsers in listing 3 other than IE6 and IE7.

Browser support for the CSS content property and :before and :after pseudo elements

The CSS content property and possible values
IE6 IE7 IE7 in IE8 IE8 FF3 FF 3.5 Beta Saf 3.2 Saf 4 Beta Opera 9.64
:before
:after
content Since :before and :after is not supported in these browsers, testing is not possible, and moot. It is assumed that IE6 and IE7 does not support the content property, therefore supports none of these values works, except for issues below works, except for issues below works, except for issues below
none n
normal displays quotes on <q> Makes sense, but not the spec.
url() nothing nothing nothing missing image icon missing image icon missing image alt
string
open-quote

close-quote

Does not nest quotes correctly, but does include quotes.
no-open-quote

no-close-quote

attr(x)
counter

Listing 3: browser support for the various values of the content property.

 

The object element

The <object> element defines an embedded object. The <object> element is used to embed multimedia objects into web pages that are generally not natively supported by the browser. Object can be used for video clips, sound, images and other media formats. “Other media formats” include formats that are generally natively supported by browsers, such as images, text and html. The <object> element (and the various attributes) and child parameters provide browsers and multimedia application embedded in browsers with the information required to display multimedia objects.

<object data="myImage.png" type="image/png"></object>
<object data="myIframe.html" type="text/html"></object>
<object data="myMusicFile.mpeg" type="application/mpeg"></object>

Listing 1: the <object> element is a generic way of including media. Use more type specific elements, such as <img> or <iframe> when available. The <img> element is discussed in part 9 of this series.

The <object> element is generally used for embedding multimedia that requires the browser to load an external application to render the media (such as a flash movie or an audio file). The <object> element, along with its attributes and child <param> elements, allows you to specify everything required by the object — applets, plug-ins, media handlers and other components you may want to include in your web page — for presentation of that media by the browser and browser plugin, including source code, data type, initial values, etc. When including a Java applet, a .swf file, an ActiveX object, or other multimedia object, specify the data and parameters for objects and the code that can be used to display and manipulate the object data via <object> element attributes and child <param> elements.

Specifications and Browser Support

While the object element was supposed to be an important addition to the HTML 4.0 standard, it is still not completely supported by all browsers; though all browsers do support it to some extent. Whether an object is supported by the browser depends on the object type. The object element can be used to show many different media types such as ActiveX, PDF, Flash, or HTML, images and text files). Unfortunately, some browsers use different code to load the same object type. The nesting of the object elements is a great solution to enable you to degrade media based on browser support.

The <object> element can be located in either the <head> or as a child of the <body> element. The <object> can be found inside both block and inline elements, including inside the <button> and <a> elements, but NOT as a child of the <pre> element. The <object> element, in turn, can contain both inline and block level elements, including <param>, <form>, text and child object elements. While we’ll discuss <param> below, note that if a <param> element is found between the <object> and </object> it is part of the object of which it is a direct child and not an alternate code to execute. If text is found between the opening and closing <object> tags, it is alternate text for browsers that do not support the <object> element or the media defined by the <object> element. If the browser is able to display any of the parent media, then the text will not be displayed.

While the object element is an INLINE element, it can contain both inline and block level elements. Because it is an inline element, some recommend only including inline elements as children. If you are providing alternative content that will be displayed, my view is that you should use whatever HTML elements are most appropriate for displaying the default content, since it is valid to do so.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" 
   width="368" height="190" title="This is my flash movie">
   <param name="movie" value="myFlash.swf" />
   <param name="quality" value="high" />
   
   <object data="myImageName.jpg" type="image/jpeg">
     Some text 
   </object>
</object>

Listing 2: Example of code for an <object> element embedding a .swf file. I’ve added a nested image object for browsers not supporting flash (think iPhone!), and some default text if images are not displayed or found.

The <object> element

<object> elements can be nested inside a parent <object> element to provide the browser with alternative content to present if the browser is unable to display the media included by the outermost parent <object>. The browser walks thru the nested <object> media until it finds a media type it can render. If a browser is unable to render the media type of the parent object, the browser will try to render the next child <object> element until it finds an <object> with a datatype it is able to render. The search for the first renderable child will continue thru all the included object, and, if no renderable <objects> are found, the browser will display any HTML content, including images, that is the child of the inner-most <object> element.

For example, if you are displaying a Flash movie, but the user’s browser does not have the flash player installed, then you can present the user an image. However, if the user is using a tele-type reader, then you can serve the user text instead.

If the <object> element does not display properly, the content nested between the <object> and </object> tags will be executed. This allows allows you to have several nested object elements (one for each browser, depending on browser media support), and default text for some browsers if the content is not found or if the media is not supported.

Note: When the browser supports the media type, but the file is not found, browsers differ on whether or not to show the nested content.

Examples of simple <object> elements in action

<object data="real_file.htm" type="text/html" width="300" height="200">
  <p>The link to <a href="missingfile.htm">a real page</a> will 
  not show in browsers,since browsers can render html</p>
</object>

EXAMPLE 1: Since the HTML data file DOES exist, the HTML file linked to with the data attribute will display. Browsers include the html file object in an iframe like display — in this case a 200 x 300px iframe since height and width were declared.

<object data="fake_file.htm" type="text/html" width="300" height="200">
  <p>The link to <a href="missingfile.htm">a missing page</a> will 
  show in some browsers, and not in others </p>
</object>

EXAMPLE 2: Since the HTML data file does NOT exist, the above will display differently in different browsers. For example, IE6 provides an empty iFrame like 200px by 300px space, Safari displays the paragraph, and Firefox displays nothing.

<object data="real_pdf.pdf" type="application/pdf" width="300" height="200">
  <p>The link to <a href="real_pdf.pdf>a real pdf file</a> will 
  show in some browsers. Others will display the Adobe Acrobat application 
  within and iframe</p>
</object>

EXAMPLE 3: Since the pdf file DOES exist, the HTML file linked to with the data attribute will display IF the browser supports displaying PDF files within a browser window. However, if the user’s browser does not support in-browser displays of Adobe Acrobat, the paragraph with the link to the pdf file will be displayed.

<object data="myMusicFile.mpeg" type="application/mpeg">
     <object data="missingImage.jpg" type="image/jpeg">
        My Text Replacement 
     </object>
</object>

Listing 4: If you have Quicktime, or some other audio format plugin supported by your browser, the music file will be displayed. If there is no media player, the browser will display the JPG instead of MPEG. However, in our example, the image doesn’t exist. Firefox and Safari correctly display the replacement text. However, IE6 tries to display the missing image.

Note that in example four, the image is included as an <object> instead of <img> because I wanted to display the text ONLY if the image did not load: I didn’t want to display both. Browsers will consider the <img> element as part of the data to be displayed if the user agent can not render the data in the outer object element. Since the <object> element does not support the alt attribute, a better way of coding the contents of listing 2 would be:

<object data="myMusicFile.mpeg" type="application/mpeg">
     <img src="myImageName.jpg" alt="My Text Replacement" /> 

</object>

This is more appropriate since you can include an alt attribute with the image. If a user agent does not render images, the text provided in the alt attribute will be displayed, which was what was intended in Listing 2.

Attributes of the <object> element

In addition to the core attributes and internationalization attributes, the <object> element accepts the following attributes:

  • declare

    The declare attribute, when included, states that the object should only be declared, not created or instantiated until needed. The declare attribute only takes one value: declare="declare".

  • classid

    The classid attribute defines a class ID value as set in the Windows Registry or a URL. Used to specify the location of the object’s implementation, the URL syntax depends upon the object’s type. The value can be either a traditional address or an apparently incomprehensible string of letters and digits that are actually the letters C-L-S-I-D, followed by a colon, space and the object ID, such as “CLSID: 99B42120-6EC7-11CF-A6C7-00AA00A47DD2”, for an ActiveX control. Classid is used in conjunction with or as an alternative to the data attribute. Unless you can figure out the Registry of classid’s, get the correct classid value from the supplier of the ActiveX control. For example, for .swf files, the classid value is generated by Flash when the developer publishes the .swf and associated .html file from the .fla file. Or, when using Dreamweaver to inset media, Dreamweaver automatically includes the correct classid value..

  • codebase

    This codebase attribute contains the URL to use as a relative base for the URL specified by the classid attribute. In Listing 2 above, the URL of the codebase points to the codebase for the flash player or plug in. Note that the URL for the SWF file is included in the child parameter and NOT in the <object> element.

  • data

    Another URL, the data attribute contains the location of the data required by an object. This should be either a relative or absolute path the your file.

  • type

    This type attribute specifies the content-type, or MIME type, for the object’s data. This is different from the codetype (below), which is the MIME type of the object and not of the data it uses.

  • codetype

    This attribute specifies an object’s content-type, or MIME type. This defines the MIME type of the object, not the the data the object may use, as defined in the data attribute.

  • archive

    This archive attribute contains an absolute or relative URL, or space separated list of URLs, for the location of archive files. An archive file is generally used to contain multiple object files to improve the ability to access the object improving perceived download time.

  • standby

    If you want to define the text displayed while the object is loading include the standby attribute with the text message to be displayed as the attribute value.

  • height

    This height attribute specifies the height of the object in pixels or as a percentage of the enclosing window, depending on whether the percentage symbol is included. This value is overridden if the CSS defines a height for the object.

  • width

    This width attribute specifies the width of the object in pixels or as a percentage of the enclosing window, depending on whether the percentage sign is included in the attribute value. The CSS width property overrides the element attribute value when included.

  • usemap

    Objects can have hyperlinks associated with them through standard links using the <a> element, thru embedded linking mechanisms such as links in a flash movie, and also via image maps. The usemap attribute generally takes a fragment identifier referencing a map element somewhere else within the file of the image map to be used with the object as the value, but can also take an URL to a map in a separate file in browsers that support such behavior. If you include the usemap attribute, you should also include a <map> and the object will most likely be an image. An image map specifies active geometric regions of an included object and assigns a link to each region. Image maps are covered in part 10 of this series.

  • name

    The name attribute is allowed, but is not required.

  • tabindex

    Along with <a>,<area>,<button><input>, <select> and <textarea>, the <object> element also supports the tabindex attribute.

The border, align, datafld, dataformats, datasrc, hspace and vspace attributes for the <object> element have all been deprecated in XHTML.

The <param> element

The <param> element is used to define special parameters used to control Shockwave and Flash SWF files, ActiveX controls, Netscape Navigator plug-ins, and Java applets. The <param> element can only be nested within a parent <object> or <applet> element. (Note that the <applet> element is not valid in XHTML strict). Parameters set attributes specific to different types of objects. For example, a Flash object can use a quality parameter <param name=”quality” value=”best”> for the object tag. If you are using Dreamweaver, you will find a Parameter dialog box in the Property inspector.

The <param> element is an empty element, so must be closed with a trailing slash. The name attribute is REQUIRED. The value attribute, while optional, should be included. The <param> element also accepts the id, valuetype, and type attributes.

Note: There is no widely accepted standard for identifying data files for ActiveX controls. See the documentation for the object you’re using for information on the parameters it requires.