Re: Teaching HTML & CSS to 15-year-olds - advice sought



On Sun, 4 Dec 2005, D.M. Procida wrote:

> We're talking about a syllabus, from the exam board, which describes the
> HTML source as "the HTML program".
[...]

Then it's as I feared, and I shall say little more about the main
agenda, since I'm powerless to do anything constructive. But you did
ask some specific technical questions...

> > W3C HTML validation -> "Character coding mismatch" - this is
> > potentially a problem, should be resolved
>
> Hmm, that's interesting - that only shows up when the page is served by
> a server, not when the file is checked by itself for compliance.

Your server is setting an explicit character encoding attribute (that
misleadingly-named "charset=" attribute) on its HTTP header.

For background: http://www.w3.org/International/O-charset.html

> If I don't know what a server is going to serve up in its HTTP
> headers say, how can I set the character coding in the document with
> confidence?

You can't. You need to find out either how to adjust your server
(probably an AddCharset directive in a .htaccess file), or you just
have to adjust your own authoring to what the server is sending (which
in your case is iso-8859-1).

(I gather that you've overwritten your sample file now?).

Defaulting a server to sending charset=iso-8859-1 was a kneejerk
reaction by Apache to the security alert CERT-CA-2000-02, and
remained in place for some years.

It's still true that it's good practice to set the *correct* charset=
attribute on the HTTP header; but sending the wrong one is worse than
leaving it off altogether.

AIUI, this default setting now features in a bug report at Apache, and
future versions will default differently. The long and short is that
it's worthwhile to learn how to control this via .htaccess if you want
to do a proper job. But leaving it at iso-8859-1, and saving your web
pages using that character encoding, is a technically valid option,
and is fine by currently used browsers (NN4.* would have problems if
you use characters outside of - roughly speaking - the Latin-1
repertoire, but well, tough, NN4 has been dead for years.)

> > -> the "our logo" link is absurd.
>
> This is awkward.

Well, this is my special topic, so I'll try not to overdo the comment,
but really, it's a *necessary* part of web page design to understand
the purpose of alt text and to use it sensibly. I don't see any
reason why the kiddies couldn't comprehend this, and come out with a
feeling of satisfaction at having understood how to apply this
principle of accessible web page design.

> It seemed easier to leave it like that:

You need to make up your mind what the link is meant to *do*.

"our logo" is absolutely NOT the purpose of this link. Taking the
link doesn't have anything to DO with a logo.

Here's the official words again:

Several non-textual elements (IMG, AREA, APPLET, and INPUT) require
authors to specify alternate text to serve as content when the
element cannot be rendered normally."

(HTML spec, http://www.w3.org/TR/html4/struct/objects.html#h-13.8 )

Focus on that meaning: the alternative text is meant *to serve as
content*. Stop imagining that you are being asked to explain the
image. Start thinking of WHY the image is there, and then provide
alternative text which, as text, does *the equivalent job*. Simple,
once one has got rid of the wrong idea.

> I don't have the time for, and I don't think many of them would
> follow, an explanation of why we need the alt=, but why we are
> leaving it blank.

You can't *do* that with a link - that would be a WAI violation.
You've got to provide meaningful text. Since this links to the
company's home page, the alt text should be obvious. (Except that
this already *was* the company's home page, so the link should not
have been there.)

But I need to contradict you. Coding alt="" in the appropriate
circumstances is quite normal, and *is* recommended for images which
are otherwise decorative. It's not something that you can prevaricate
about, and especially not something that you can set a bad example by
supplying irrelevant alternative text. Read the cited section of the
HTML spec again:

Do not specify irrelevant alternate text when including images
intended to format a page, for instance, alt="red ball" would be
inappropriate for an image that adds a red ball for decorating a
heading or paragraph. In such cases, the alternate text should be the
empty string ("").

OK, "page formatting" wasn't quite the context which you'd created
here, but the advice nevertheless is just as applicable for the
situation.

> The course examiners would have no idea either.

That's the problem.

> I appreciate all suggestions here, but please try to bear in mind the
> conditions under which I have to do this.

Which is why I said what I did. I don't see much hope. The course
setters have clearly decided they already understand web design, and
have no need to learn it themselves. The situation is hopeless, and I
can only feel sorry for the victims of this system - you included.

sigh
.



Relevant Pages

  • Re: More sale items - better format
    ... Hi, first of all, in web design the designer doesn't get to specify ... I was reading through my HTML ... books but that looks like a dead end neither VBScript or JavaScript ... advertising server. ...
    (rec.models.scale)
  • Re: includes, design view, preview view
    ... Any code that requires execution on the server, will not appear in FP in ... That is why it best to trying and separate your code from HTML, ... > not show up in the design view or preview the way they do ...
    (microsoft.public.frontpage.client)
  • Re: HTML or Dreamweaver?
    ... HTML is not sufficient for writing the code on the server required to ... process orders and payments. ... I suggest you pick a design from because it is ...
    (alt.html)
  • Re: Am I the only one who questions JSTL, Struts Tags, XSL Tags?
    ... HTML is a great BROWSING format for BROWSERS ... > server can't push stuff to the client and caches stuff when we don't want ... stateless, page oriented design. ...
    (comp.lang.java.programmer)
  • Re: How to do a post back when user press enter.
    ... It is hosted on a web server, ... the client browser, which is designed to read and interpret HTML. ... UI, via the event handler. ...
    (microsoft.public.dotnet.framework.aspnet)