The Content Query Web Part (CQWP) makes it easy to create a list of things to display to your users. Unfortunately, the CQWP does not actually make a list, instead it renders out tables that only look like a list. There are numerous reasons why you may want to use an HTML unordered (UL) or ordered (OL) list instead (accessibility, readability of code, conformance with modern web development standards), but the primary reason is that the UL/OL is semantically correct in most situations. Fortunately, convincing the CQWP to render a UL/OL is easy, and relatively straightforward.
If you’ve ever modified ItemStyle.xsl and the *.webpart file to add custom fields to the CQWP, you are ready to dive right in. If not, you may want to check out some other articles on modifying these files first.
The first thing we need to do is create copies of ContentQueryMain.xsl and ItemStyle.xsl (both files are located in /Style Library/XSL Style Sheets). By working with a copy of these files we can be sure that no future WSS\MOSS updates will overwrite our work. You can use SharePoint Designer (SPD) for this, but I prefer to use Windows Explorer.
To start, we will want to get a CQWP up and running using our copied files. This will enable us to make a change in the XSL, then immediately view its’ impact on the rendered CQWP. We need to update two properties to point to our custom XSL files: MainXslLink and ItemXslLink. It should look like this:
<property name="MainXslLink" type="string">/Style Library/XSL Style Sheets/ContentQueryMainCustom.xsl</property>
<property name="ItemXslLink" type="string">/Style Library/XSL Style Sheets/ItemStyleCustom.xsl</property>
Go ahead and upload your .webpart file, and view your CQWP. At this point it should be functional, and look unchanged.
Next, open up your copy of ContentQueryMain.xsl and locate the template OuterTemplate. Inside this template you will notice opening and closing table and row tags. Replace these tags with corresponding UL or OL tags: 
Next, locate the template OuterTemplate.Body, which should be a few lines down from the template we were just working on. There is a lot of garbage in this template which is used for rendering multiple columns (find references to BeginColumn and EndColumn). There is also some code which checks to see if a new group header row needs to be written, if you’re not using groups you can remove that as well. Here is the template, stripped down the bare essentials:

Finally, we need to modify our custom ItemStyle.xsl. All we are going to do here is update the XSL to render a LI, and remove the divs:

Now we can save the files and view the rendered CQWP. It should look something like this:

Download the files used in this article (2.82 kb)