sizing of en faq page on http://www.gnupg.org

Michael Nahrath gpgweb-devel@nahrath.de
Wed, 11 Dec 2002 17:50:50 +0100


Werner Koch <wk@gnupg.org> schrieb am 2002-12-11 15:28 Uhr:

> On Wed, 11 Dec 2002 00:55:17 +0100, Michael Nahrath said:
> 
>> 'pre' (PREformatted text) absolutely prevents line-breaking inside its
>> content.
> 
> Then we need to explain, that it is meant as just one line.  PRE
> allows us to show exactly how it should be typed.

Yes, that's the advantage - but in terms of accessibility the disadvantage
at the same time, at least if nested in tables.
 
>> - don't use <pre>.
>>   Rather use <code> for program output and <kbd> for program input.

I have to correct myself.

There exists a better element to markup program output than 'code'.
Rather use 'samp'.

<http://www.w3.org/TR/html401/struct/text.html#edef-SAMP> for more
information.

In usual browser defaults it makes no difference in the rendering at all.

But it gives you better possibilities for styling and maybe some
applications that really care for souch semantic details have some profit (I
don't know how eg. aureal browser would handel this).

>>   Linebreaks will be set by the browser automatically.
> 
> What are the properties of KBD?  Does the browser give some
> indication whether there is a real line break.

Unfortunately not, at least in no browser that I know.

If it is importent, that lines are typed in as one you may prevent the worst
by including &nbsp; at places where linebreaks would be especially
disturbing. 
And you'll need to comment that this has to be read as one line.

Example for this (not from the FAQ):

<kbd>gpg --keyserver&nbsp;keyserver.kjsl.com --recv-key 9A4C704C</kbd><br />

<samp>pub  1024D/9A4C704C  created:&nbsp;2001-11-02
expires:&nbsp;never</samp>
 
>> - use <pre> but care to break long lines manually.

Pro: you have at least controll about the breaks.

How do you deal the following line (from FAQ:4.12) if you have to send it by
mail?

 gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | awk
'/^\[GNUPG:\] ENC_TO / { print $3 }'

Same could be done by hard-breaking inside 'pre'.

Con: You have linebreaks even for users with vast displays and windows that
would rather read one long line.

Greeting, Michi