0

I have an HTML link

<a href='#'><button>+</button> Show advanced options</a>

which reveals the hidden options upon clicking the button or link. The problem is that there is an underline between the button and the text (just the one character before "Show".) Is there any way to remove it?

Mika H.
  • 4,119
  • 11
  • 44
  • 60

3 Answers3

11

style the hyper link

a {text-decoration: none;}
Nagarjun
  • 2,346
  • 19
  • 28
0

use css text-decoration property :

<a href='#' style='text-decoration:none;'><button>+</button> Show advanced options</a>

but button inside an anchor tag is invalid

you can use onclick event for the button

Mohammad Masoudian
  • 3,483
  • 7
  • 27
  • 45
0

A button tag inside an a tag is not valid. This line comes from the w3 validator:

The element button must not appear as a descendant of the a element.
<a href="test"><button>a</button></a>
Carrie Kendall
  • 11,124
  • 5
  • 61
  • 81
Fons
  • 155
  • 1
  • 9