SEO: <button> vs HTML tags [closed]

2019-02-13 14:58发布

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?

2条回答
混吃等死
2楼-- · 2019-02-13 15:28

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.

查看更多
Fickle 薄情
3楼-- · 2019-02-13 15:30

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.

查看更多
登录 后发表回答