近年来在网站的链接中我们经常会看到类似rel=”nofollow”或rel=”external nofollow”的属性定义,有很多朋友并不明白它们的语义,今天园子就详细给大家分析一下rel 这个属性在网页中的用法。
rel 属性是用来说明链接和包含此链接页面的关系,以及链接打开的目标。它有许多的属性值,比如next、previous,、chapter、section等等。我们现在比较长见的是rel=”external nofollow”与rel=”nofollow”两种参数的应用。
首先来说下Nofollow
“Nofollow”向网站管理员提供了一种方式,即告诉搜索引擎”不要追踪此网页上的链接”或”不要追踪此特定链接“。 最初,nofollow 属性出现在网页级元标记中,指示搜索引擎不要追踪(即抓取)网页上的所有外向链接。 例如:
<meta name="robots" content="nofollow" />
或者您可以这样用:
<a href="signin.php" rel="nofollow">用户注册</a>
再来说说external nofollow
rel=”external nofollow”只是更相对于rel=”nofollow”参数更加规范一些。rel=”external nofollow”与rel=”nofollow”其功能就中文译文”不要读取” 及”外部链接不要读取“,就已说得很清楚了。其实rel=”external”只是一个替代target=”_blank” 的属性。target=”_blank” 的属性是打开新窗口。但有些博客因为是采用严格的DOCTYPE声名的,如果你打开网站的源代码,在第一行的位置就可以看到:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
在这种情况下target=”_blank”可能会失效,因此采用rel=”external”这个参数来替代,因此我们可以明白rel=”external”的属性只是打开新窗口的作用。
通过上面的说明您应该明白在何种情况下可以考虑使用nofollow了吧?以下列出经常用到nofollow的几种情况:
- 不可信赖的内容
- 付费链接
- 按优先级别进行抓取
更多可以参见 GOOGLE 的官方文档。
相关推荐
详解HTML标签属性link rel="dns-prefetch"是什么意思? DNS Prefetch有什么用处?
AD问题详解==========================
link rel=stylesheet href=css/bootstrap-3.0.0/css/bootstrap.css rel=external nofollow rel=external nofollow rel=external nofollow rel=external nofollow > </head> <body> <hello></hello...
link rel=stylesheet href=~/assets/css/bootstrap.min.css rel=external nofollow > <link rel=stylesheet href=~/assets/css/font-awesome.min.css rel=external nofollow > <!-- 自定义样式 -->...
本文实例为大家分享了laydate时间日历控件的使用方法,供大家参考,具体内容如下 ...此控件可使用layui或者独立版的layDate,...link rel="stylesheet" href="/static/build/layui.css" rel="external nofollow" media=
extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解extern用法详解...
1. a href=”[removed]js_method();” rel=”external nofollow” 这种方法在传递this等参数的时候很容易出问题,而且[removed]协议作为a的href属性的...” rel=”external nofollow” rel=”external nofollow” onc
link href="video-js.css" rel="external nofollow" rel="stylesheet" type="text/css"> [removed][removed] 使用免费的CDN托管版本 <link href=...
bootstrap3-dialog-master是一...link rel="stylesheet" type="text/css" href="css/bootstrap-dialog.css" rel="external nofollow" > <link rel="stylesheet" type="text/css" href="css/bootstrap.css" rel=
link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="external nofollow" rel="external nofollow" rel="stylesheet"> <script src="https://cdn.bootcss.com/
Java_详解_1、==和Equal用法与比较
下载到本地后,新建个页面测试 1、在head中加入css和js的引用 <head> <title>highlight<...link rel="stylesheet" href="styles/default.css" rel="external nofollow" rel="external nofol
44. 相对dTree来说, xTree功能要多一些, 能动态增减树的节点 45. 引入树: 46. <!-- The xtree script file --> ...48. <link type="text/css" rel="stylesheet" href="xtree.css"> 49. 实例化树, 并显示
WinDbg用法详解,包括WinDbg用法入门及命令用法讲解。 WinDbg用法详解,包括WinDbg用法入门及命令用法讲解。
link href=https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css rel=external nofollow rel=stylesheet> 引入分页器: <div id=rootbox> 文章列表 <ul id=bloglist> {# 遍历博文 #
Todo清单 需要实现的功能有添加任务、删除任务、编辑任务,操作要关联数据库。...link rel=stylesheet href=../static/css/main.css rel=external nofollow > {% endblock %} {% block navbar %} <nav class=navbar>
1. 可用于, <button>, 或 <input> 元素的按钮样式 按钮样式使用: ...link rel=stylesheet href=./css/bootstrap.min.css rel=external nofollow > <script type=text/javascript src=
本文实例为大家分享了bootstrap轮播模板展示...link rel=stylesheet href=https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css rel=external nofollow > <style type=text/css> .carousel { he
link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/themes/default/easyui.css rel=external nofollow rel=external nofollow > <link rel=stylesheet ...