Validate the <ul> code

hi all

i m not understanding the error coming at w3 validator for my code .

how can i validate this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

The bots track the following and store in a database:
<li>Auto approve comment links</li>

this is the error

Line 10, Column 1: character data is not allowed here

The bots track the following and store in a database:

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:
    putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

[FONT=Verdana]You can’t have ‘loose’ text inside a <ul> … the only things you can have in there are <li>s.

If you don’t want that first line of text to be bulleted, you’ll need to put it in a <p>…</p> before the opening <ul> tag.[/FONT]

Stevies got it right, and it may also be possible that text should be a numbered heading, not a paragraph, but that depends on the context on the page.

Bottom line though is the only thing that can come as children of OL or UL is LI – loose text or other tags are not allowed/invalid/don’t make any sense in the first place. You might have the heading for a list, that doesn’t make it part OF the list.

thanks stevie for the clarification


You might consider a definition list.