问题原文
原帖链接 · bumerang · CC BY-SA 3.0
I'm making a new layout for our website, and I want to make a list using the unordered list tag (ul) to show our offers. But because of our design I would like to use the h3 tag into an a element.
How would my idea impact SEO?
Here's an example in code of what I'm trying to achieve:
<a><h3>Header</h3><p>Text</p></a>
I believe the following HTML (which contains my idea) is valid, but how would it affect SEO?
<!DOCTYPE html>
<html>
<head><title>Test</title>
<body>
<a>
<h3>Header</h3>
<p>Text</p>
</a>
</body>
</html>
已采纳解答
原帖链接 · Martijn · CC BY-SA 4.0
The rules are simple regarding to this:
You are not allowed to wrap an inline element around a block element.
The exception: If you use HTML5, you may wrap in anchor around a block element.
From a SEO perspective it doesn't have influence, it's valid html so they wont discredit for that.
It doesn't help either. You're ramming a whole paragraph into an anchor, making the value of each word in it very very small, and you also stuff it with words your don't care about ("This is an example" » only keyword is 'example', yet the whole sentence is the anchor).
From User Interface point of view, it can (depends on the implementation) be very odd, the whole paragraph is a link? "Huh, I just clicked plain text and now I've changed page?!".
- David Walsh has a small article with almost the exact same example
- Which is more correct: <h1><a>..</a></h1> OR <a><h1>..</h1></a> from SEO point of view?
- Difference between a block and an inline element
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
