2

When I search for a css button generator they always have code that styles an anchor.

<a href="#" class="button">The Button</a>

But I'm wondering why they don't ever try to style a generic button:

<input type="button" value="The Button" />

is it because it's harder to style an input of type button?

2 Answers 2

4

The styling will make buttons and anchors look the same. However the functional aspects are what make you decide to use a button or a link.

I would recommend using a link if you are going to follow a link, and a button if you want to submit a form or perform an action, say AJAX call.

Sign up to request clarification or add additional context in comments.

Comments

2

Typically the input buttons are going to look like whatever the users computer defaults to for a button. Using anchor tags along with image sprites lets you have more control over what the "button" is going to look like.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.