Mailing List Archive

Wikipedia HTML standards (was Skins)
If you want redesign wikipedia's look or add a skin, here's
what I consider to be the basic requirements. Others may want to
add to or quibble with these, but I consider them important to
the point where I would not be likely to implement anything
that violates them:

- All output, both inside the article text and outside, must
be fully W3C-compliant HTML 4.0 for now, and XHTML 1.0 at some
point in the future.

- Markup should be as economical as possible for performance.

Within the article text itself:

- The text of the article must be rendered as actual text with
appropriate semantic labeling, so that it is readable on all
browsers, including text-only browsers like Lynx, speech
browsers for the blind, etc. The HTML code within the article
should be the same on all skins. No visual markup should be used.

- Style elements should be contained in an externally linked
stylesheet, using valid CSS (preferably mostly CSS 1, but CSS 2
where the effect can't be achieved otherwise). Styles should be
attached to elements within the article based on element classes
and unique IDs.

- JavaScript should not be used with the article text.

- Article text must not depend on any system-specific features
like non-standard symbol fonts.

- Article text should be in high-contrast colors that are not so
overly loud they induce eye strain, and serifed fonts are
preferred for readability.

Outside the article text (sidebars, etc.) things can be a bit more
relaxed:

- JavaScript can be used for "extra" functionality (like form
validations) as long as the site is still usable by those that
don't have JavaScript or have it turned off.

- Site should render reasonably on Netscape 4.X, Gecko-based
browsers (Mozilla, Netscape 7, Galeon...), KHTML-based browsers
(Konqueror, Safari...), MS Internet Explorer 4+, and Lynx.
It's OK if some non-vital features won't render on some
browsers, especially Netscape 4.X and Lynx, as long as users
of those browsers can still view and edit articles and otherwise
interact with the site normally.

- Text in sidebars, forms, etc., should be readable but doesn't
have to face the same constraints as article text: for example
louder colors and sans-serif fonts are fine.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: Wikipedia HTML standards (was Skins) [ In reply to ]
On Mon, 24 Mar 2003 14:31:52 -0600, Lee Daniel Crocker
<lee@piclab.com> wrote:

>
> - Article text should be in high-contrast colors that are not so
> overly loud they induce eye strain, and serifed fonts are
> preferred for readability.
>
<Klaxon sound>
From my personal experience I strongly disagree with this. I side with the
various research studies which show that whilst serifed fonts provide
better readability on paper, sans-serif is more readable on screen.
In addition, typefances with metrics that depart considerably from the norm
(such as verdana) are best avoided. (My personal favourite is Trebuchet,
which I use for nearly everything).

Perhaps the best solution is that font-family preference should be left
entirely to the user?
--
Richard Grevers
Re: Re: Wikipedia HTML standards (was Skins) [ In reply to ]
> (Richard Grevers <dramatic@xtra.co.nz>):
> On Mon, 24 Mar 2003 14:31:52 -0600, Lee Daniel Crocker
> <lee@piclab.com> wrote:
>
> >- Article text should be in high-contrast colors that are not so
> >overly loud they induce eye strain, and serifed fonts are
> >preferred for readability.
> >
> <Klaxon sound>
> From my personal experience I strongly disagree with this. I side with the
> various research studies which show that whilst serifed fonts provide
> better readability on paper, sans-serif is more readable on screen.
> In addition, typefances with metrics that depart considerably from the norm
> (such as verdana) are best avoided. (My personal favourite is Trebuchet,
> which I use for nearly everything).
>
> Perhaps the best solution is that font-family preference should be left
> entirely to the user?

The user will always be free to have his browser substitute his own
stylesheets. If a Sans font is clean and readable on screen, that's
good too--that particular point is a suggestion, not a firm requirement.
Trebuchet is nice--do you know if there's any free equivalent? I tend
to use Lucida fonts myself which are easy to find, but I think Bitstream
recently donated some more modern ones to the public we might want to
look into. I certainly don't want us to standardize on anything that
only looks good on Windows machines.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: Re: Wikipedia HTML standards (was Skins) [ In reply to ]
On Mon, Mar 24, 2003 at 04:10:14PM -0600, Lee Daniel Crocker wrote:
> > (Richard Grevers <dramatic@xtra.co.nz>):
> > On Mon, 24 Mar 2003 14:31:52 -0600, Lee Daniel Crocker
> > <lee@piclab.com> wrote:
> >
> > >- Article text should be in high-contrast colors that are not so
> > >overly loud they induce eye strain, and serifed fonts are
> > >preferred for readability.
> > >
> > <Klaxon sound>
> > From my personal experience I strongly disagree with this. I side with the
> > various research studies which show that whilst serifed fonts provide
> > better readability on paper, sans-serif is more readable on screen.
> > In addition, typefances with metrics that depart considerably from the norm
> > (such as verdana) are best avoided. (My personal favourite is Trebuchet,
> > which I use for nearly everything).
> >
> > Perhaps the best solution is that font-family preference should be left
> > entirely to the user?
>
> The user will always be free to have his browser substitute his own
> stylesheets. If a Sans font is clean and readable on screen, that's
> good too--that particular point is a suggestion, not a firm requirement.
> Trebuchet is nice--do you know if there's any free equivalent? I tend
> to use Lucida fonts myself which are easy to find, but I think Bitstream
> recently donated some more modern ones to the public we might want to
> look into. I certainly don't want us to standardize on anything that
> only looks good on Windows machines.

Personally choosing a font, or relying on one, is universally considered
a Bad Idea(tm). If you want a sans font, fine - specify that you want a
sans font in the stylesheet. Forcing a particular font is just a bad
idea - usually the UA will know which font is best.

--
Nick Reinking -- eschewing obfuscation since 1981 -- Minneapolis, MN
Re: Wikipedia HTML standards (was Skins) [ In reply to ]
Lee Daniel Crocker wrote:

>
>- Site should render reasonably on Netscape 4.X, Gecko-based
> browsers (Mozilla, Netscape 7, Galeon...), KHTML-based browsers
> (Konqueror, Safari...), MS Internet Explorer 4+, and Lynx.
> It's OK if some non-vital features won't render on some
> browsers, especially Netscape 4.X and Lynx, as long as users
> of those browsers can still view and edit articles and otherwise
> interact with the site normally.
>
>
The default skin, yes.
But user-selectable skins shouldn't be afraid to ONLY parse for
standards-compliant browsers -- provided we *say so loudly* in the
preferences selection.
Re: Wikipedia HTML standards [ In reply to ]
Lee Daniel Crocker wrote:

>If you want redesign wikipedia's look or add a skin, here's
>what I consider to be the basic requirements. Others may want to
>add to or quibble with these, but I consider them important to
>the point where I would not be likely to implement anything
>that violates them:
>
>- All output, both inside the article text and outside, must
> be fully W3C-compliant HTML 4.0 for now, and XHTML 1.0 at some
> point in the future.
>
>
>
We need to close our <P> tags before we validate!
Re: Wikipedia HTML standards [ In reply to ]
> >- All output, both inside the article text and outside, must
> > be fully W3C-compliant HTML 4.0 for now, and XHTML 1.0 at some
> > point in the future.
> >
> We need to close our <P> tags before we validate!

Only for XHTML, and we aren't there yet. The pages should
validate as HTML 4.0 Transitional now, modulo any bugs that
may have been introduced since I last did that (I know of
one I'm working on).

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: Wikipedia HTML standards [ In reply to ]
On Fri, Mar 28, 2003 at 01:14:11PM -0600, Lee Daniel Crocker wrote:
> > >- All output, both inside the article text and outside, must
> > > be fully W3C-compliant HTML 4.0 for now, and XHTML 1.0 at some
> > > point in the future.
> > >
> > We need to close our <P> tags before we validate!
>
> Only for XHTML, and we aren't there yet. The pages should
> validate as HTML 4.0 Transitional now, modulo any bugs that
> may have been introduced since I last did that (I know of
> one I'm working on).

I don't believe closing your <p> tags violates 4.01, and it moves us
closer to XHTML. As such, it seems like a damned good idea to me. :)
What annoys me more is how ugly our HTML looks. I'll admit; ugly HTML
is not wrong, but it is pretty distasteful. Kind of like playing gothic
rock at a funeral. :P Could we settle on a standard look for our HTML?
I see things like this all the time (pulled out of rabbit):

<SCRIPT TYPE="text/javascript"> (capitalization suckiness)
<a href="....." class='internal'> (mixed quotes)
#quickbar a.new { color: CC2200; ) (invalid, but possibly parsed)
<table width='98%'> border=0 cellspacing=0> (mixed/missing quotes)

Can we just settle upon lowercase tags and double quotes around all
attributes?

--
Nick Reinking -- eschewing obfuscation since 1981 -- Minneapolis, MN
Re: Wikipedia HTML standards [ In reply to ]
> (Nick Reinking <nick@twoevils.org>):
>
> <SCRIPT TYPE="text/javascript"> (capitalization suckiness)
> <a href="....." class='internal'> (mixed quotes)
> #quickbar a.new { color: CC2200; ) (invalid, but possibly parsed)
> <table width='98%'> border=0 cellspacing=0> (mixed/missing quotes)
>
> Can we just settle upon lowercase tags and double quotes around all
> attributes?

I did settle on lowercase tags--somebody else added that SCRIPT,
which I'd love to remove as soon as I figure out what it's there
for. Quotes are trickier: I can't just change them all unilaterally
because they are chosen based on the possible values of the
attribute: i.e., those that might possibly contain single quotes
are put in doubles, and vice versa. Though admittedly, some of
them are just chosen to make the PHP code easier (i.e., when HTML
is part of a PHP string, single quotes are used just because it's
easier to read "='internal'" than "=\"internal\"".

A future version of the software will produce a DOM for each page
rather than straight HTML, and then a module will produce various
outputs from the DOM. That's a ways off.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: Wikipedia HTML standards [ In reply to ]
On Fri, Mar 28, 2003 at 01:36:50PM -0600, Lee Daniel Crocker wrote:
> > (Nick Reinking <nick@twoevils.org>):
> >
> > <SCRIPT TYPE="text/javascript"> (capitalization suckiness)
> > <a href="....." class='internal'> (mixed quotes)
> > #quickbar a.new { color: CC2200; ) (invalid, but possibly parsed)
> > <table width='98%'> border=0 cellspacing=0> (mixed/missing quotes)
> >
> > Can we just settle upon lowercase tags and double quotes around all
> > attributes?
>
> I did settle on lowercase tags--somebody else added that SCRIPT,
> which I'd love to remove as soon as I figure out what it's there
> for. Quotes are trickier: I can't just change them all unilaterally
> because they are chosen based on the possible values of the
> attribute: i.e., those that might possibly contain single quotes
> are put in doubles, and vice versa. Though admittedly, some of
> them are just chosen to make the PHP code easier (i.e., when HTML
> is part of a PHP string, single quotes are used just because it's
> easier to read "='internal'" than "=\"internal\"".
>
> A future version of the software will produce a DOM for each page
> rather than straight HTML, and then a module will produce various
> outputs from the DOM. That's a ways off.

Oh, and one other thing. It seems to me that it could be good to
shorten the name of some of the styles. I mean, it may seem silly to
shorten 'internal' to 'int' and 'external' to 'ext', but hear me out.
Say, these appear 20 times on the average page (probably low, they
appear 55 times on Rabbit.)

Average monthly bandwith usage:
20 * 5 * 200000 * 30 / 1048576 = ~ 572.2MB/month

20 = average appearances of 'internal' and 'external'
5 = character difference (5 bytes)
200000 = hits/day
30 = days in a month
1048576 = bytes in a MB

--
Nick Reinking -- eschewing obfuscation since 1981 -- Minneapolis, MN
Re: Wikipedia HTML standards [ In reply to ]
> (Nick Reinking <nick@twoevils.org>):
>
> Oh, and one other thing. It seems to me that it could be good to
> shorten the name of some of the styles. I mean, it may seem silly to
> shorten 'internal' to 'int' and 'external' to 'ext', but hear me out.
> Say, these appear 20 times on the average page (probably low, they
> appear 55 times on Rabbit.)

I'm not at all resistant to that idea--also, making the internal
links use relative URLs should tighten things up as well.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: Wikipedia HTML standards [ In reply to ]
On Fri, 28 Mar 2003, Lee Daniel Crocker wrote:
> > (Nick Reinking <nick@twoevils.org>):
> > <SCRIPT TYPE="text/javascript"> (capitalization suckiness)
>
> I did settle on lowercase tags--somebody else added that SCRIPT,
> which I'd love to remove as soon as I figure out what it's there
> for.

That's for the optional 'enhanced recentchanges', I believe. It should be
moved to a .js file and only referenced when using said enhanced
recentchanges.

> Quotes are trickier: I can't just change them all unilaterally
> because they are chosen based on the possible values of the
> attribute: i.e., those that might possibly contain single quotes
> are put in doubles, and vice versa.

Better IMHO to always use htmlspecialchars() to escape attribute values
that aren't guaranteed to be safe (like integers that you've just
calculated). Reduces the nasty-mistake potential.

-- brion vibber (brion @ pobox.com)