more whining about LJ markup
Sep. 6th, 2003 01:28 amA pet peeve of mine: Often somebody on LiveJournal formats a list full of
Now, in the ultramodern XHTML world we have to close all our tags so we can't have that. So something in the system dreams up this abomination out of its little machine brain:
Wrong, wrong, WRONG.
LI elements in the old-fashioned caveman HTML way, without closing tags, like so:<UL> <LI> foo <LI> bar <LI> baz </UL>Now, in the ultramodern XHTML world we have to close all our tags so we can't have that. So something in the system dreams up this abomination out of its little machine brain:
<UL> <LI> foo <LI> bar <LI> baz </UL> </LI></LI></LI>Wrong, wrong, WRONG.
no subject
Date: 2003-09-06 09:54 am (UTC)<UL> <LI /> foo <LI /> bar <LI /> baz </UL>It's still goofy of course. Whatever posessed them?
no subject
Date: 2003-09-06 01:30 pm (UTC)no subject
Date: 2003-09-06 09:54 am (UTC)no subject
Date: 2003-09-06 02:32 pm (UTC)no subject
Date: 2003-09-06 02:43 pm (UTC)no subject
Date: 2003-09-06 02:49 pm (UTC)no subject
Date: 2003-09-06 02:55 pm (UTC)But what are the people who are writing
<UL> <LI> foo <LI> bar <LI> baz </UL> </LI></LI></LI>
writing? MY DEATH KNELL?
no subject
Date: 2003-09-06 03:07 pm (UTC)no subject
Date: 2003-09-06 07:14 pm (UTC)<UL> <LI> foo </LI> <LI>bar</LI> <LI>baz</LI> </UL>
I usually do in list format in the source anyway, so I can keep it straight:
<UL>
<LI>foo</LI>
<LI>bar</LI>
<LI>baz</LI>
</UL>
It also makes for easier changed to the content.
You don't have to close it in html. I can't remember if the validator will whine about it. I think it does, IIRC. Xhtml, I have no idea about. I have'nt gotten that far yet.
no subject
Date: 2003-09-06 02:45 pm (UTC)If you have a paid account you can mess with the style templates to such an extent that you can fix the problems in them. (You'll notice there is no uppercase markup on my journal, and I think the lastn page is even validating as XHTML 1.0 Transitional today.) But the problems on the back end can't be fixed this way, not to mention problems in third-party content.
no subject
Date: 2003-09-06 02:47 pm (UTC)no subject
Date: 2003-09-06 04:03 pm (UTC)< UL> < LI> foo </LI> < LI> bar </LI> < LI> baz </LI> </UL>
No issues for me. Always did what I wanted it to do. The only tag that I didn't close was < P>.
no subject
Date: 2003-09-06 07:17 pm (UTC)Technically, you need to close those too. But I'm being anal now. Otherwise the validator will whine about it. Been there, done that.
Optional end tags
Date: 2003-09-07 05:26 am (UTC)P and LI elements don't technically need explicit closing tags in HTML (even HTML 4.0 Strict!), though it's a good idea anyway, especially if you use lots of CSS layout.
But they do need to be closed in all versions of XHTML. All elements must have opening and closing tags in XHTML unless they are single-tag elements that are "self-closing", which is explicitly indicated with the closing slash, like so: <BR />
The difference is that HTML is theoretically an application of SGML, which had all sorts of weird methods for abbreviating tag syntax (most of which were never actually implemented in browsers!), whereas XHTML is theoretically an application of XML, which was intentionally designed to have much simpler and more restrictive syntax rules than SGML.
Re: Optional end tags
Date: 2003-09-07 05:28 am (UTC)no subject
Date: 2003-09-06 07:51 pm (UTC)