Print

Print


Hi Sebastian,

On 11-08-18 11:49 AM, Sebastian Rahtz wrote:
> What happens if you just ignore the silly XHTML schema, and
> interspersed the li with div anyway? Do browsers render it?

Oh Sebastian, you know I can't do that. I want my sites to be valid. :-)

Browsers render the bad code, but they tend to do different things with 
it, because they're in quirks mode, and there's no prescribed behaviour 
for quirks mode. That's the main reason I want my pages to be valid; it 
means all browsers display them the same way (nowadays).

> If you
> make html5, us it any better?

I'm pretty sure the only allowed element content in <ul> is <li> in 
HTML5 too.

> Another choice is to detect this situation and generate div for each
> item, not li. That may grate with you, but in some ways the right
> thing to do.

Yes, I see that. I already do it with <lg>; if it only has <l>s in it, I 
use <ul>, but if it has any other content, I create a <div>. But it's 
very messy, and it means keeping the CSS parallel for two different 
contexts, which is annoying.

> Continued lists, if they are numbered, are a pain. But on the whole I
> guess I would lean towards stopping and starting the lists. As in
> fact I guess I will have to, since you note my stylesheets fail...

They don't fail; they just don't handle every contingency that can arise 
in tei_all. If they did, they'd be longer than War and Peace. :-)

Cheers,
Martin

-- 
Martin Holmes
University of Victoria Humanities Computing and Media Centre
([log in to unmask])