How Can I Remove the Underline from Part of an Anchor in HTML/CSS?

July 6, 2025 8 answers
Asked by CreativeFox42
I'm working on a personal project with HTML and CSS, and I'm trying to create a back button to navigate to the previous page. However, there's an underline beneath the arrow character (⮜) in my button that won't go away. I've attached my code below for reference. I've tried using 'text-decoration: none' but it hasn't worked. How can I fix this?

Answers

Editorial team
Reply to this answer
Keven Krok
c
Reply to this answer
CodeNinja88
You should replace the
with a inside the anchor tag. This will help maintain valid HTML structure and make it easier to style without issues. Using a keeps everything inline properly and simplifies the styling.

TechWhiz101: I hadn't heard of before. Unfortunately, it doesn't seem to solve the problem... Thanks for the suggestion, though!

Reply to this answer
Editorial team
t
Reply to this answer
Dan
{
Reply to this answer
Editorial team
r
Reply to this answer
Elli Mongillo
:
Reply to this answer
Editorial team
a
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions