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 8975531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:54:23+00:00 2026-06-15T18:54:23+00:00

I have this HTML: <ul> <li> <ul> <li> <a href=#> <span> Test </span> Link

  • 0

I have this HTML:

<ul>
<li>
    <ul>
        <li>
            <a href="#"> <span> Test </span> Link </a>
        </li>
    </ul>
</li>
</ul>​

And this CSS:

ul li ul li span {

    text-decoration:none;
}​

Why would the span inside the anchor still have underline?

In other words: How would I get all the text underlined, except the SPAN. Thanks

  • 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-06-15T18:54:24+00:00Added an answer on June 15, 2026 at 6:54 pm

    You need to target the anchor tag and not the span tag so use this

    ul li ul li a {
        text-decoration:none;
    }​
    

    Reason: text-decoration: underline; is applied to <a> tag by default browser stylesheet, so if you want to over ride it or if you want that none of the <a> tags on your website should have an underline than simply use this

    a {
       text-decoration: none;
    }
    

    Edit: As I read your comment if you want your text to be underline except the text within <span> than use this

    Demo

    ul li ul li a {
        text-decoration:underline;
    }
    
    ul li ul li a span {
        text-decoration:none;
        display: inline-block;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this html: <a style=display:block; padding:100%; text-decoration: none; href=http://google.com class=Jasmin id=target_site_to_visit> <span
I have html like this. <span class=gallery-open-item year-icon-Yes 2010> <a href=/year/none> </a> </span> I
I have the html below: <span class=srch-URL> <a id=CSR_U_2 href=http://www.test.com/TestForm.aspx>http://www.test.com/TestForm.aspx</a> </span> I am trying
I have some HTML like this: <h4 class=box_header clearfix> <span> <a rel=dialog href=http://www.google.com/?q=word>Search</a> </span>
I have this: HTML: <div id=selectedsongs> <a href=# rel=1>song1></a> <a href=# rel=2>song2></a> <a href=#
i have this html: <span class=price> $61.00 <span class=detailFreeShipping>With Free Shipping</span> </span> How to
I have this HTML dropdown: <form> <input type=text id=realtxt onkeyup=searchSel()> <select id=select name=basic-combo size=1>
I have this html: <div class=foo parent> <div class=child></div> </div> with some css: .foo{
I was wondering, i have this HTML : <li> <span class=jqTransformRadioWrapper> <a rel=choices[choices] class=jqTransformRadio
I have got this html: <a href=http://www.google.com data-ref=su1c2cess class=Wifewriting id=target_site_to_visit> <span data-app-id=63 class=btn id=visit_site

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.