English 中文(简体)
主管内部的法官,或反之亦然,与《全球环境展望》相比是否有不同? [闭门]
原标题:Anchors inside headers, or vice versa - is there a different in relation to SEO? [closed]

这个问题似乎并不涉及在help Center中界定的范围之内的方案规划。

Closed 3 years ago.

我在这样作时始终不.(更简单的问题)。 语音博客。 如果我总结一下标题,该标题也应作为链接,载于<代码><a>要素,或者应当作为其他途径。 为什么?

<>>:

<a href="foo">
    <h1>bar</h1>
</a>

<><>>:

<h1>
    <a href="foo">bar</a>
</h1>

我在结束发言时始终强调,正如我看来更合乎逻辑的那样,标题是用一个链接总结的。

它是否在例如这样作。 SEO? 这是否反映了《全球环境展望》的排名?

最佳回答

Prior to HTML5:
The anchor has to be inside the header, you cannot put a block-level element inside an anchor, and most browsers will not render it 100% reliably if you do.

In HTML5:
It doesn t matter, use whichever one makes the most semantic sense. Likely the first one.

请注意,如果贵文件使用超文本4DTD s,则不会有效,而且可能不会正确无误,因为它使用旧规则,而封顶不能包含一个零件。 只使用第一种选择的超文本5。 X 超文本相当于超文本4,Im 不能100%地确定X/110,尽管如此(在它看来是有效的)。

问题回答

如果您重新使用超文本4.01 DTD (肯定过渡,但肯定是严格)后, anchor子必须出现在主人身上。 如果你不知道你会再次使用哪类高科技技术(假设你有的话,你确实需要高标准才能认为有效)。 超文本5 c 类:

<!DOCTYPE HTML>

The 4.01 doctype is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

我也建议,如果你重新着手处理4.01号文件,它将回答所有这些类型的问题,那么他会熟悉TD本身。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签