为 SEO 和可访问性构建 HTML 文档的最佳方法是什么? [英] What is the best way to structure an HTML document for SEO and accessibility?

查看:40
本文介绍了为 SEO 和可访问性构建 HTML 文档的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建包含导航的 html 的推荐方法是什么,这样它仍然可以通过 SEO 进行搜索和访问.

What's the recommended way to structure html that includes navigation so it's still SEO'able and accessible.

例如,结构是否应该更像文档:

For example, should the structure be more like that of a document:

  1. 跳到内容(链接,由 CSS 隐藏)
  2. 导航
  3. 内容
  4. 其他内容(右侧窗格等)

或:

  1. 跳到导航(链接,由 CSS 隐藏)
  2. 内容
  3. 导航
  4. 其他内容(右侧窗格等)

显然 CSS 用于控制布局,但机器人和屏幕阅读器会忽略 CSS.

Obviously CSS is used to control the layout, but bots and screen-readers ignore the CSS.

推荐答案

我之前曾被客户要求在内容之后移动导航,但我认为这对他们没有多大帮助.我一般按照你上面提到的第一个结构.

I've been asked to move the navigation after content by a client before, but I don't think it helped them much. I generally follow the first structure you mention above.

一些随机提示:

  • 让您的标记符合标准、有效且简单.
  • 不要填充关键字或任何东西.
  • 像对待标题一样对待标题.确保只有 1 个 h1 标签.在整个页面中谨慎使用标题(Google - 在PDF 下载).
  • 在锚点上使用标题属性,在图像上使用 alt 属性(但前提是图像需要对某些用户使用等效文本).
  • 使用 rel="nofollow" 将 PR 内容引导至您真正希望他们访问的页面.
  • 保持每个页面的内容独一无二.
  • 使用 Google 网站管理员工具以及 MSN 和 Yahoo! 的等效工具.
  • 构建、提交和维护 sitemap.xml 文件.
  • Keep your markup standards-compliant, valid and simple.
  • Don't stuff keywords or anything.
  • Treat headings like they should be treated. Make sure there's only 1 h1 tag. Use headings sparingly across the page (Google - in the PDF download).
  • Use title attributes on anchors and alt attributes on images (but only if the image needs a text equivalent for some users).
  • Use rel="nofollow" to direct PR juice to pages you really want them to go to.
  • Keep content unique for each page.
  • Use Google webmaster tools and MSN and Yahoo!'s equivalent.
  • Build, submit and maintain sitemap.xml files.

这篇关于为 SEO 和可访问性构建 HTML 文档的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆