00156: unordered list

Summary: unordered list
Created: 2004-11-12 13:11
Status: Closed - not a bug
Category: Bug
From: Stefan
Assigned:
Priority: 3
Version: 2.0.devel20
OS: Linux/Apache

Description: Something like

  • item one
    • subitem one
  • item two

produces the following code with "hanging" </li>s

<ul>

	<li> <a class='urllink' href='...'>News</a>
	<ul>
		<li> <a class='urllink' href='...'>Heute</a></li>
		<li> <a class='urllink' href='...'>Archiv</a></li>
	</ul></li>

</ul>


Ummm, I don't see the "hanging" </li>s you're describing. For example, the "item one/subitem one/item two markup" given above in the example is correctly producing:

 
<ul><li> item one
<ul><li> subitem one
</li></ul></li><li> item two
</li></ul>
  

Each list item is correctly terminated. What's more, this page correctly validates -- see http://validator.w3.org/check?uri=referer.

Can you give a better example?

--Pm


I thought it should look like

 
<ul>
  <li> item one</li>
    <ul>
      <li> subitem one</li>
    </ul>
  <li> item two</li>
</ul>
  

But probably I'm wrong ... -- Stefan


Stefan - your example is not correct. A list must be within a list.

e.g.

 <ul>
  <li> item one
    <ul>
      <li> subitem one</li>
    </ul>
  </li>
  <li> item two</li>
</ul>

not

 <ul>
  <li> item one</li>
    <ul>
      <li> subitem one</li>
    </ul>
  <li> item two</li>
</ul>
  

Stated another way, the only thing that a <ul> element can contain is <li> elements. Anything nested inside an unordered list must be inside of the <li>'s. --Pm

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_COOKIE] => PHPSESSID=v852laktqdjf55md7a5v43jio2; imstime=1777519379
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=PITS%2f00156
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=PITS%2f00156
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00156
            [REDIRECT_SCRIPT_URL] => /wiki/PITS/00156
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afLLJ8tXhlzLabma_AunEwAAAEQ
            [REDIRECT_URL] => /wiki/PITS/00156
            [REMOTE_ADDR] => 216.73.216.31
            [REMOTE_PORT] => 43289
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/PITS/00156
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00156
            [SCRIPT_URL] => /wiki/PITS/00156
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afLLJ8tXhlzLabma_AunEwAAAEQ
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777519399.5012
            [REQUEST_TIME] => 1777519399
            [argv] => Array
                (
                    [0] => n=PITS%2f00156
                )

            [argc] => 1
        )

)