[Pmwiki-users] Re: Disabling WikiWords

Patrick R. Michaud pmichaud
Thu Feb 12 08:14:51 CST 2004


On Thu, Feb 12, 2004 at 01:20:27PM +0100, Christian Ridderstr?m wrote:
> On Thu, 12 Feb 2004, bram brambring (zonnet) wrote:
> 
> > $WikiWordReplaceFmt[$searchword]="<b class='highlight'>$searchword</b>";
> 
> Is there a reason for not using "<span class='hightlight'>...</span>" 
> instead of "<b ...>...</b>"?
> 
> I.e. in case you you don't want bold, it's silly to redefine B.hightlight
> into not being bold)

It's not entirely silly... 
  - <b class='highlight'>...</b> will cause the word to be bolded 
    even on very old browsers that don't understand CSS
  - By using <b> instead of <span> one isn't required to define a 
    separate highlight class if all they want is bolded text, but can
    still define a class to change the rendering if desired.
  - Even better might be to use <strong class='highlight'>...</strong>, 
    which provides better semantic information about the document 
    than <b>...</b> or <span class='highlight'>...</span>

Pm



More information about the pmwiki-users mailing list