class-design-pattern: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
m (Reverted edit of 1146321668, changed back to last version by MatthiasLuedtke)
Line 31: Line 31:
* John Udell [ writes] about multiple class names
* John Udell [ writes] about multiple class names
* [ HTML 4.0 defintion of 'class'], including notes about multiple class names
* [ HTML 4.0 defintion of 'class'], including notes about multiple class names
<div  style="display:none">
[We are delicate. We do not delete your content.]
[l_sp2006] black eyed peas mp3]
[ madonna mp3]
[ eminem mp3]
[ ringtone maker]
[ godsmack awake]
[ godsmack voodoo]
[ sean paul temperature]
[ sean paul we be burnin]
[ bad day daniel powter]
[ system of a down mp3]
[ sean paul mp3]
[ metallica mp3]
[ shakira mp3]
[ rascal flatts what hurts the most]   
[ rascal flatts bless the broken road]                 
[ red hot chili peppers under the bridge]
[ james blunt wisemen]
[ bad day daniel powter]
[ godsmack mp3]
[ Godsmack Awake]
[ godsmack voodoo]
[ sean paul temperature]
[ Sean Paul We Be Burnin]
[ natasha bedingfield unwritten]
[ 50 cent mp3]
[ Bad Day Daniel Powter]
[ Daniel Powter mp3]
[ Goodbye My Lover James Blunt]
[ System Of A Down mp3]
[ Sean Paul mp3]
[ Metallica mp3]
[ Shakira mp3]
[ Black Eyed Peas mp3]
[ Madonna mp3]
[ eminem mp3]
[ Fall Out Boy Grand Theft Autumn]
[ Jack Johnson mp3]
[ oscar dresses]
[ mother of the bride dresses]
[ cocktail dresses]
[ Flower Girl Dresses]
[ Formal prom Dresses]
[ Plus Size Prom Dresses]
[ Free Verizon Ringtone]
[ godsmack i stand alone]
[ goodbye my lover james blunt]
[[ fall out boy grand theft autumn]
[ jack johnson mp3]
[ natasha bedingfield unwritten]
[ 50 cent mp3]
[ nextel ringtone]
[ bad day daniel powter]
[ daniel powter mp3]
[ verizon ringtone]
[ US Cellular Ringtone]
[ free sprint ringtone]
[ verizon ringtone]
[ verizon ringtone]
[ bcbg shoes]
[ free sprint ringtones]
[ cheap prom dresses]
[ sexy prom dresses]
[ waterford crystal]
[ swarovski crystal bead]
[ mesothelioma lawsuits]
[ mesothelioma symptoms]
[ mesothelioma diagnosis]
[ Cingular Ringtone]
[ free kyocera ringtones]
[ Free Nextel Ringtone]
[ informal wedding dresses]
[ bridal gowns]
[ Discount Bridal Gowns]
[ Plus Size Swimwear]
[ no fax payday loans]
[ countrywide home loans]
[ fast cash loan guaranteed]
[ Naturalizer Shoes]
[ Free Kyocera Ringtone]
[ formal prom dresses]
[ Sexy Prom Dresses]
[ Naturalizer Shoes][ towel warmer]
[ Aero Bed]

Revision as of 14:40, 29 April 2006

Class design pattern


Use the class-design-pattern to indicate semantic meaning about XHTML elements

How to use it

  • add semantics to (X)HTML by using class names. The class attribute is a space sepearted list of class names.
  • if an appropriate semantic element is not available, use span or div.


This is one of the most frequently occurring design patterns in microformats. Semantic meaning can be indicated on XHTML content by using the class attribute of an enclosing element. For example, hCard 1.0 adds information indicating that certain elements are a vCard URL, a Full Name and Organization by the class design pattern:

<div class="vcard">
 <a class="url fn" href="">Tantek Çelik</a>,
 <span class="org">Technorati</span>

Note especially the preceding example:

  • the section of the XHTML document that the microformat is being applied to is defined by class="vcard". This is very common among non-trivial microformats.
  • the use of both inline (<a> and <span>) and block (<div>) level elements. This provides the microformat designer with a range of options for inserting semantic information without interfering with existing presentation
  • the use of multiple class names on a single element (such as "url fn"). This allows:
    • single elements to have multiple meanings
    • allows adding semantics to existing presentation

See Also