[whatwg] contenteditable, <em> and <strong>

Henri Sivonen hsivonen at iki.fi
Wed Jan 10 05:01:22 PST 2007


On Jan 10, 2007, at 11:40, fantasai wrote:

> That depends, actually, on the language. Browsing the Chinese journal
> section of a university East Asian Library, I noticed that the Chinese
> journals didn't use normal/italics -- instead they switched the  
> style of
> font between their equivalents of serif and cursive.

Isn't that a use case for reintroducing <font> with serif mapping to  
mincho and sans-serif mapping to gothic? ;-)

> Granted these switches were on a per-paragraph level in the text I  
> saw, but East Asian typesetting
> tends not to use italics in general.

I am aware of this. But the practically locked-in Web-compatible UA  
style sheet italicizes <em>, so East Asian Web authors need to deal  
with that default.

> They have other means of indicating emphasis: various underlining  
> styles,

Is there data on <u> usage on East Asian pages? Should HTML5  
legitimize <u>? (For Latin pages, a restyled <u> would be more  
compatible than <m>.)

> bold,

Seems like a case for keeping <b> around.

> (in Japanese) a switch to katakana,

Wouldn't a normal Japanese writer enter the text as katakana into the  
document content instead of requesting the UA to transform hiragana  
or even kanji to katakana?

> East Asian texts also don't use italics for works titles: they have  
> a set of special punctuation for that.

I hazard a guess that it is more straight-forward, practical and  
compatible to enter that punctuation in the document content than to  
restyle <cite> to insert the punctuation as generated content.

> You can argue that
> italics and bold should be strictly equivalent to em and strong  
> because all
> that matters is that their presentation is the same, but that  
> argument doesn't
> hold up for non-Latin texts.

The way I see it is that speccing <i> and <em> as synonyms and <b>  
and <strong> as synonyms is harmless if pages written in scripts for  
which italics and bold are inapplicable don't use <i> and <b>.

> Restyling <em> sitewide to use 'text-emphasis'
> instead of 'font-style: italic' would be a nifty thing on a  
> Japanese website.

I agree.

> Restyling <i> the same way would just be silly.

 From a CSS perspective, there's no difference. If <em> and <i> were  
defined to be semantically equivalent, there'd be no difference from  
the semantic point of view either. That would leave the personal code  
aesthetics that particular hand-coders associate with the identifiers  
"em" and "i". If an author who control both markup and style chooses  
one over the other, that's cool.

But that's still about site-wide styling. Is it too late for any of  
this to have an impact on the UA style sheet?

Would it be compatible with the Web to add the following to the UA  
style sheets of visual browsers?

em:lang(ja) {
   font-style: normal;
   text-emphasis: accent before;
}

em:lang(ja-Latn) {
   font-style: italic;
   text-emphasis: none;
}

If that would be compatible with the Web, would the following be?

em:lang(ja), i:lang(ja) {
   font-style: normal;
   text-emphasis: accent before;
}

em:lang(ja-Latn), i:lang(ja-Latn) {
   font-style: italic;
   text-emphasis: none;
}

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the whatwg mailing list