Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:08:52+00:00 2026-05-27T15:08:52+00:00

I am using HTML Tidy to output pretty HTML source and as a final

  • 0

I am using HTML Tidy to output pretty HTML source and as a final encoding check.

However it is taking a very simple list such as:

<ul id="navigation">
            <a href="index.php"><li>Summary</li></a>
            <a href="#"><li>Upload</li></a>
            <a href="accounts.php"><li>Accounts</li></a>
        </ul>

and converting it to this monstrosity:

 <ul id="navigation">
        <li style="list-style: none">
          <a href="index.php"></a>
        </li>
        <li id="active">Summary
        </li>

        <li style="list-style: none">
          <a href="#"></a>
        </li>
        <li>Upload
        </li>
        <li style="list-style: none">
          <a href="accounts.php"></a>
        </li>
        <li>Accounts
        </li>

      </ul>

How do I gracefully tell it to leave my list alone?

I have searched these configuration options, however I often find they are not named intuitively or explained properly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:08:53+00:00Added an answer on May 27, 2026 at 3:08 pm

    The only answer: give it valid markup to start with. The only legal child element of a ul is an li. An a element cannot be a child of a ul.

    <ul id="navigation">
        <li><a href="index.php">Summary</a></li>
        <li><a href="#">Upload</a></li>
        <li><a href="accounts.php">Accounts</a></li>
    </ul>
    

    If you want the whole li to be clickable, style the a element as display: block:

    #navigation li a {
        display: block;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML tidy extension on my home computer using PHP 5.2.11 (Windows -
I am using the PHP 5 Tidy class to format html. Everything is fine
I want to extract particular part of HTML using tidy in php. the html
Using HTML I want to use 2 checkbox, when i click the check box
I'm trying to parse HTML using TouchXML . However, it seems that the data
I'm using http://tidy.sourceforge.net/ to convert HTML to XHTML and I want to transform this
I am using Jinja2 to generate HTML files which are typically very huge in
I am using VC++ 2010 Express and I am attempting to include HTML Tidy
Using @Html.EditorFor(model =>model.IsClient) , where IsClient is a boolean, renders a drop down list
I am using HTML.BeginForm to upload files. This part works fine. However, in addition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.