rel

All list of values for HTML rel attribute

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 19:20:01
问题 I would like to know more on rel attribute used with a html elements. Does anyone know some list of attributes useful for SEO and social? <a title="" rel="friend met neighbor" href="#">This is a link</a> I know it only inside WordPress and it's links manager, but nothing more. 回答1: HTML5 defines some values for the rel attribute: http://www.w3.org/TR/html5/links.html#linkTypes For the use in HTML5, all other link types need to be defined/listed on this page in the microformats wiki: http:/

Link Referrer in HTML

六月ゝ 毕业季﹏ 提交于 2019-12-13 08:56:24
问题 I want to ask a quetion about rel property of a tag in HTML (actually, HTML5 if that will make any difference) I'll continue with example domain names. My website is example.com. I've a link to this page at example2.com. If I give this link with something like <a href="example.com" referrer="referrer.com">Click me</a> will my referrer be referrer.com or example2.com? BTW is there anything possible like that code? Giving a random referrer? 2nd one, because I think subjects are similar. Is it

Link relation type for linking representations to the abstract resource?

旧街凉风 提交于 2019-12-13 00:31:51
问题 I use Content negotiation to let user-agents select one of several representations for a resource. Example : the resource http://example.com/essay has the following representations: text/html → http://example.com/essay.html application/xhtml+xml → http://example.com/essay.xhtml application/pdf → http://example.com/essay.pdf Let’s say the user-agent selects the HTML variant. Now I could link the other representations with the link relation type alternate: <link rel="alternate" type=

Lightbox without rel tag or addRel without jQuery

强颜欢笑 提交于 2019-12-13 00:20:40
问题 This is the idea. I want to put a lightbox (or slimbox or mediabox or whateverbox) on my forum so that it will open user-posted links in lightbox. Problem is, lightbox requires the rel=lightbox tag, and people are too lazy to use the custom bbcode that adds the correct rel tag to the link. So, can lightbox (or any other) work for all links without the rel tag? The alternative is to add the rel tag to all links. I can use the 'addRel' function from jquery, but it would be a waste to include

jquery change attribute

谁都会走 提交于 2019-12-12 11:55:52
问题 i have 4 links and i need to change the href attribute in a rel attribute. i know i cannot do it so i'm trying to get the data from the href attribute, setting a new attribute (rel), inserting the data inside it and then removing the href attibute. basically i'm doing this: $('div#menu ul li a').each(function(){ var lin = $(this).attr('href'); $('div#menu ul li a').attr('rel',lin); $(this).removeAttr('href'); }) }) it works but it sets the same rel data in every link i have. any help? 回答1: $(

how to add rel attribute to tr of table

北慕城南 提交于 2019-12-11 20:09:48
问题 I need to add rel attribute to the row of this table for some reason. I did this but it doesnt work. How should I do it? <?php $query = $con->prepare("query"); $query->execute(); while($result = $query->fetch(PDO::FETCH_ASSOC)) { $id = $res['name']; echo "<tr[rel = '".$id."']>"; echo "<td>".$res['roll']."</td>"; echo "<td>".$res['name']."</td>"; echo "<td>".$res['dept']."</td>"; } ?> 回答1: Use echo '<tr rel="'.$id.'">'; echo outputs HTML code; <tr[rel=whatever]> is incorrect HTML. 回答2: $id =

getElementsByTagName setAttribute and regex javascript

扶醉桌前 提交于 2019-12-11 19:56:36
问题 i want to put rel=lightbox to some links that mediabox support using javascript. i try this and wonder why it's not working? test: http://jsbin.com/opica please help edit this: http://jsbin.com/opica/edit <script type="text/javascript"> var x=xmlDoc.getElementsByTagName("a"); var regexku=/^.+(((twit)|(tweet)|(com/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/; for(i=0;i<x.length;i++) { a=x[i].getAttribute('href'); if (a.match(regexku) != null) { x.item

How to prevent showing same image when there are two anchors opening the same gallery with fancy box on same page?

有些话、适合烂在心里 提交于 2019-12-11 04:49:05
问题 I have a page that has two ways to open a gallery of images/videos that open in fancybox 2. The problem is that because there are two links that open the start of the gallery with the first image, the first image is displayed twice in the gallery. Here is my example http://www.londonsitedesign.co.uk/test.html How can I prevent the first image being displayed twice in the gallery? 回答1: If the first link will only start the fancybox gallery, then it doesn't need to have the fancybox class

HTML中<a>标签的rel属性的含义_HTML5新增属性值

懵懂的女人 提交于 2019-12-10 07:23:16
HTML中<a>标签有个rel属性,这篇文章简要介绍下rel属性的含义、Value,及在HTML5中新增的一些属性值。 1、rel属性定义: <a>标签的rel属性 用于指出当前文档与被链接文档的关系 。仅在有href属性存在的情况下使用,我们常在link标签中用到,比如:<link rel=“ stylesheet” style="text/css" href=“../” >。 2、作用介绍: a.rel属性是指定连接的关系类型,表明所连接的文档和此连接的关系; b.把这个属性根据实际情况写的话, 对于搜索引擎来说,会起到一定的链接作用。特别是在html5中,部分属性还专门为浏览器或搜索引擎而提供的; c.部分属性,是针对一些客户终端而设计的,具体百度找下相关知识,这里暂不研究了。 3、HTML4.01与 HTML5之间的差异 已删除的值:appendix, chapter, contents, copyright, glossary, index, section, start, subsection。 新的值:archives, author, bookmark, external, first, index, last, license, nofollow, noreferrer, search, sidebar, tag, up。 4、属性值及描述: 值 描述

Jquery: Add rel attribute to <a> tags within all <li> tags of a certain class

早过忘川 提交于 2019-12-07 09:11:51
问题 I'm trying to add a rel="lightframe" attribute to all my 'edit' links within my admin_links_node_edit class. <li class="admin_links_node_edit"> <a href="[link]" title="Edit">Edit</a> </li> My code so far looks like this: $('.admin_links_node_edit a').each(function() { $(this).attr('rel','lightframe'); }); 回答1: You don't need to use each(). jQuery's selectors will do it for you :) $('.admin_links_node_edit a').attr('rel', 'lightframe') The above code will do the trick. 回答2: If admin_links_node