Re: CSS3 - Define Language

* Tyler Rasmussen (rasmo2000@hotmail.com) wrote:

> I am currently working on a webpage using HTML and CSS for a forgiegn
> language class at my school.  I find it very annoying to have to type:
>
> <DIV class="es" lang="es"></DIV>

> <DIV class="en" lang="en"></DIV>
>
> Over and over again.

Drop the class="" and use CSS 2 selectors and what's already been
described in the HTML:

div[lang="en"] {
        color: black;
        background-color: white;
}

div[lang="es"] {
        color: white;
        backgorund-color: black;
}

Unfortunately you'll need to go bug Microsoft to add CSS 2 selector
support to IE, since this will currently only work in Mozilla and Opera,
*grumble*

> I think it would work wonders for pages like this if you could define
> the language of text inside a certain tag by the CSS document.  I
> mean, really, language is part of the style of the document.

No, language is part of the content of a document, since it refers
directly to individual sections of text.

Saying class="en" and defining language in the CSS actually reduces the
value of the document, since you can no longer directly determine the
language it's written in without going to the otherwise semantically
useless stylesheet; especially bad if you're a search engine.

-- 
Thomas 'Freaky' Hurst  -  freaky@aagh.net  -  http://www.aagh.net/
-
A man of genius makes no mistakes.
His errors are volitional and are the portals of discovery.
		-- James Joyce, "Ulysses"

Received on Friday, 15 March 2002 07:19:11 UTC