WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Unclosed list tags

for

Number of posts in this thread: 7 (In chronological order)

From: Victoria Hamill
Date: Wed, Oct 06 2004 10:36AM
Subject: Unclosed list tags
No previous message | Next message →





Hi,

I have a question about which is the lesser of two evils. We develop sites
using a Content Management tool we have built using Lotus Domino. One of
the weaknesses of this is that Domino occasionally "makes up" the html for
the rich text elements as it goes along.

For instance, when generating a list, it forgets to close the tag, so
you end up with something like the following:


Option one....
Option 2...
Option 3...


Content Managers were previously laying out bulleted lists using tables
with 2 columns to show the bullet in the first column. Clearly this isn't a
good way of showing lists, but at least they were seperate rows and looked
good.

We don't want to have to train all of our content managers on how to
manually code lists properly in HTML - and if we did try, they would
probably just ignore recommendations anyway!

So my question is, which is the lesser of two evils? Putting it in a table,
or having unclosed tags?

Thanks for any suggestions

Victoria

From: Chris Heilmann
Date: Wed, Oct 06 2004 10:49AM
Subject: Re: Unclosed list tags
← Previous message | Next message →


> So my question is, which is the lesser of two evils? Putting it in a
> table,
> or having unclosed tags?

Open LI I'd say. Another option would be to alter the workflow of the
system to run every generated page through tidy[1] before it is put on the
server. We have done this with a 500k CMS here, and voila, the HTML is
clean.

[1] http://sourceforge.net/projects/tidy/

--
Chris Heilmann
http://icant.co.uk/ | http://www.onlinetools.org/

From: Jukka K. Korpela
Date: Wed, Oct 06 2004 10:56AM
Subject: Re: Unclosed list tags
← Previous message | Next message →

On Wed, 6 Oct 2004, victoria.hamill wrote:

> So my question is, which is the lesser of two evils? Putting it in a table,
> or having unclosed tags?

Both approaches are fairly harmless, and using unclosed elements is
completely harmless.

Closing elements with tags is optional by HTML specifications
up to and including HTML 4.01. It is obligatory in XHTML, but real XHTML
won't be suitable for the WWW for years (since IE does not support real
XHTML). Browsers won't notice if you omit tags.

Using a table would be rather harmless too, provided that the images
you use in the function of list bullets have adequate alt attributes
(maybe alt="", maybe alt="item:" or alt="item 1:" etc.; a moot point).

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

From: Jared Smith
Date: Wed, Oct 06 2004 10:59AM
Subject: Re: Unclosed list tags
← Previous message | Next message →

> So my question is, which is the lesser of two evils? Putting it in a table,
> or having unclosed tags?

I would think the list is a better solution than an improper use of
tables. There are a whole lot of more serious HTML errors than not
closing the tag. Besides, closing the tag is not required in
HTML. It is required in XHTML, but I seriously doubt that Domino is
producing XHTML documents anyways.

Here's a short article that does sum up some of the more common
mistakes done in (X)HTML documents:
http://www.456bereastreet.com/archive/200408/web_development_mistakes/

Jared Smith
WebAIM (Web Accessibility In Mind)
Center for Persons with Disabilities
Utah State University

From: Deryck Thake
Date: Wed, Oct 06 2004 11:09AM
Subject: Re: Unclosed list tags
← Previous message | Next message →

What version of HTML/XHTML are you using? (Or, what DOCTYPE are you using?).
If the standard for your version says that end tags are optional (which I
think they are for HTML4.01) then you don't strictly have a problem with
unclosed list items.
If you are using XHTML 1.* then you do.
I believe that you should always use valid (ie, standards-compliant) code
otherwise you cannot expect your visitor's UA to render the code properly.
If you are dealing with an intranet and you can control the UA then this may
be less of a problem.

Does that help any?

Deryck

----- Original Message -----
>
> I have a question about which is the lesser of two evils. We develop sites
> using a Content Management tool we have built using Lotus Domino. One of
> the weaknesses of this is that Domino occasionally "makes up" the html for
> the rich text elements as it goes along.
>
> For instance, when generating a list, it forgets to close the tag, so
> you end up with something like the following:
>
>
> Option one....
> Option 2...
> Option 3...
>
>
> Content Managers were previously laying out bulleted lists using tables
> with 2 columns to show the bullet in the first column. Clearly this isn't
> a
> good way of showing lists, but at least they were seperate rows and looked
> good.
>
> We don't want to have to train all of our content managers on how to
> manually code lists properly in HTML - and if we did try, they would
> probably just ignore recommendations anyway!
>
> So my question is, which is the lesser of two evils? Putting it in a
> table,
> or having unclosed tags?
>
>

From: Elaine Nelson
Date: Thu, Oct 07 2004 9:45AM
Subject: Unclosed list tags
← Previous message | Next message →

> So my question is, which is the lesser of two evils? Putting it in a table,
> or having unclosed tags?

As has been noted by several respondents, closing LIs isn't required
in HTML 4...however, you may want to be careful with any CSS that you
apply to those LIs. I don't have any specific experience with this
with lists, but I seem to remember from my early experiments with CSS
some years back that strange things would happen with unclosed
paragraphs, which have the same "legal" status.

If you can do it, I'd second the suggestion of another poster that you
run the whole thing thru something like Tidy before it goes live.

--
Elaine Nelson
= EMAIL ADDRESS REMOVED =
work: http://www.pierce.ctc.edu/
notWork: http://www.epersonae.com/

From: Victoria Hamill
Date: Fri, Oct 08 2004 7:39AM
Subject: Re: Unclosed list tags
← Previous message | No next message






Thanks for the suggestion, I'll do that.
I'd got a bit muddled about standards, as have been getting so concerned
with doing everything "right" that I'd forgotton it wasn't actually a
requirement of HTML.

Victoria
-----------------------------------------------------
Victoria Hamill
NetInfo
Phone: (44) 1628-687863
Email: = EMAIL ADDRESS REMOVED =
URL: http://www.netinfo.com
- More than meets the eye



"epersonae38"
<epersonae@gmail.
com> To
"WebAIM Discussion List"
07/10/2004 16:39
cc

Please respond to Subject
"WebAIM [WebAIM] Unclosed list tags
Discussion List"
<webaim-forum@lis
t.webaim.org>








> So my question is, which is the lesser of two evils? Putting it in a
table,
> or having unclosed tags?

As has been noted by several respondents, closing LIs isn't required
in HTML 4...however, you may want to be careful with any CSS that you
apply to those LIs. I don't have any specific experience with this
with lists, but I seem to remember from my early experiments with CSS
some years back that strange things would happen with unclosed
paragraphs, which have the same "legal" status.

If you can do it, I'd second the suggestion of another poster that you
run the whole thing thru something like Tidy before it goes live.

--
Elaine Nelson
= EMAIL ADDRESS REMOVED =
work: http://www.pierce.ctc.edu/
notWork: http://www.epersonae.com/

----
To subscribe or unsubscribe, visit http://www.webaim.org/discussion/