473,473 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to construct XHTML-compliant nested list?

How do I construct an XHTML-compliant nested unordered list?

This displays correctly (both FF and IE):

<ul>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<ul>
<li>nested list item</li>
<li>nested list item</li>
<li>nested list item</li>
</ul>
</ul>

But fails validation with this error:

document type does not allow element "ul" here; assuming missing "li" start-tag.

How can I nest a list if I can't put a <ulwithin a <ul??

Thanks in advance.

Aug 25 '06 #1
6 15404
de**@nospam.com says...
How do I construct an XHTML-compliant nested unordered list?

This displays correctly (both FF and IE):

<ul>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<ul>
<li>nested list item</li>
<li>nested list item</li>
<li>nested list item</li>
</ul>
</ul>

But fails validation with this error:

document type does not allow element "ul" here; assuming missing "li" start-tag.
Logically the nested list is a child of the third list item and should be
wholly contained within it.

<ul>
<li>list item</li>
<li>list item</li>
<li>list item
<ul>
<li>nested list item</li>
<li>nested list item</li>
<li>nested list item</li>
</ul>
</li>
</ul>

If it's not logically a child of that element, don't nest it. Use
blockquote if you simply want it indented further.

Geoff M
Aug 25 '06 #2
<ul>
<li>list item</li>
<li>list item</li>
<li>list item
<ul>
<li>nested list item</li>
<li>nested list item</li>
<li>nested list item</li>
</ul>
</li>
</ul>
That did the trick. Thanks!
Aug 25 '06 #3
Geoff Muldoon wrote:
Use blockquote if you simply want it indented further.
You give good advice about proper nesting of lists and then suggest
using blockquote for indenting. You're joking, right?

Steve

Aug 25 '06 #4
Geoff Muldoon wrote:
If it's not logically a child of that element, don't nest it. Use
blockquote if you simply want it indented further.
<blockquoteis for marking up .. well .. quotes. Not as an indenting
tool.

I have several quotes on this page, for example.
http://www.freezeblock.com/homeowner.php

--
-bts
-Motorcycles defy gravity; cars just suck.
Aug 25 '06 #5
deko wrote:
How do I construct an XHTML-compliant nested unordered list?
I just answered a similar post for Luigi (a character actor who plays
roles occasionally in alt.html). He wanted to know about ordered lists,
but the markup is the same, except for the "o" or the "u".

http://k75s.home.att.net/tests.html

--
-bts
-Motorcycles defy gravity; cars just suck.
Aug 25 '06 #6
Steve Pugh <st**********@gmail.comscripsit:
Geoff Muldoon wrote:
>Use blockquote if you simply want it indented further.

You give good advice about proper nesting of lists and then suggest
using blockquote for indenting. You're joking, right?
Wasn't that obvious?

I guess we need <blockjokemarkup, the meaning of which is random
indentation and a background consisting of smileys. It should have an
optional trolling="trolling" attribute.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 25 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
82
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a...
2
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
22
by: Gianni Rondinini | last post by:
hi all. please excuse the misusage of some tech terms, but writing in english is not as easy as in italian :) i'm designing our new website and, since i want to do something that will last as...
30
by: abracad_1999 | last post by:
Is it possible to serve valid xhtml with php? xhtml requires the 1st line: <?xml version="1.0" encoding="iso-8859-1"?> But php interprets the opening <? as a php statement. If I try to echo...
11
by: Kidogg | last post by:
Hi all, I'm attempting to write a validator for some email template files we use as part of our e-commerce application (incidentally in C#) and I've run into a problem as I'm not a huge user of...
4
by: VK | last post by:
Can well-formed but non-validated XHTML have extra namespaces? Say <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />...
27
by: pamela fluente | last post by:
Hello, for the following code, VS suggests that construct (width= height= ) is out of date and a newer one is recommended: <table><tr><td width="92" height="38" valign="middle">AnyThing</td></...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.