The element a must not appear as a descendant of the button element

**<span class="search"><button class="buttonb"><a href="#">Book Now</a></button></span>**

Error in validation…
Can’t Fix it??
Please help me… :smiley:

Span is an in-line element, so cannot contain a button.
You could change the span for a div which is a block element.
Or maybe you don’t need the container and could apply the search class directly to the button.

Error show in a link… no issue of span and others…

Sorry, I did not spot the <a> in there.
You don’t use an <a> in a button, use one or the other, not both.
If you want to style the <a> use CSS.
It should be fine in the span.

That is actually not correct.

2 Likes

ok thanks…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.