[uf-discuss] Best Practice for fn and n?

Brian Suda brian.suda at gmail.com
Sun Nov 5 06:13:19 PST 2006


Having empty elements is a bad idea. TIDY will outright remove empty
<abbr/> elements, plus it goes against Human-readablity. For all the
same reasons META elements get state, empty inline elements will get
state as well.

Why not just use class="n fn", you are displaying all of the 'n' data
inside your empty 'abbr', so why not just remove the 'abbr' and move
the class='fn' to the same data as the class='n'

 <span class="vcard">
       <span class="n fn">
             <span class="honorific-prefix">Mr.</span>
             <span class="given-name">John</span>
             <abbr class="additional-name" title="Quinlin">Q.</abbr>
             <span class="family-name">Public</span>,
             <span class="honorific-suffix">M.D.</span>/>
       </span>
 </span>


On 11/5/06, Costello, Roger L. <costello at mitre.org> wrote:
> Hi Folks,
>
> Here is some HTML text that I want to markup using the hCard fn and n
> properties:
>
>          Today's speaker is Mr. John Q. Public, M.D.
>
> I propose marking it up in this fashion:
>
> Today's speaker is
> <span class="vcard">
>       <abbr class="fn" title="Mr. John Q. Public, M.D." />
>       <span class="n">
>             <span class="honorific-prefix">Mr.</span>
>             <span class="given-name">John</span>
>             <abbr class="additional-name" title="Quinlin">Q.</abbr>
>             <span class="family-name">Public</span>,
>             <span class="honorific-suffix">M.D.</span>/>
>       </span>
> </span>
>
> Notice that I am using an empty abbr element to store the value for fn.
> Is this sensible?
>
> Is there a better way to markup the HTML text?
>
> Is this Best Practice?
>
> /Roger
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>


-- 
brian suda
http://suda.co.uk


More information about the microformats-discuss mailing list