Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SEO: <button> vs <a> HTML tags [closed]

I'm building a project using Twitter Bootstrap. In the documentation it's stated:

Button tags

Use the button classes on an <a>, <button>, or <input> element.

[...]

Cross-browser rendering

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

Is this a good practice SEO-wise speaking?

like image 268
VMC Avatar asked Oct 05 '13 18:10

VMC


2 Answers

SEO-wise it is best to use the <a> tag since search engines don't go through buttons nor input but rather look for anchor tags and their attributes (href, title). So if you're linking to another page on the website which needs to be crawled by search engines it makes more sense both for SEO and with regards to semantics to use an anchor tag.

On the other hand if you're building a form, it makes much more sense to use the <button> or <input> and in this case, you should follow the recommendation in the documentation.

I believe the reference in the documentation should actually say:

[...] recommend using the element instead of the input element whenever possible [...]

Also note that most form elements including <input> and <button> have browser specific styles that are sometimes hard/impossible to change without JavaScript hence this comment in the Twitter Bootstrap documentation.

like image 83
grim Avatar answered Oct 05 '22 12:10

grim


As i know google doesn't click on buttons and this bad for SEO. because many buttons makes form submit or JavaScript execution and it's not useful. I can see it on google-analytics of my website. it's caching only a tags href's.

like image 36
Dvir Avatar answered Oct 05 '22 11:10

Dvir