Replace with span gives problems in page SEO?

1

Well, I have this html to enable the title and link of the article:

<h1 class='post-title entry-title'>
    <b:if cond='data:post.link'> 
        <a expr:href='data:post.link'><data:post.title/></a> 
    <b:else/> 
    <b:if cond='data:post.url'> 
        <a expr:href='data:post.url'><data:post.title/></a> 
    <b:else/> 
        <data:post.title/> 
    </b:if> 
    </b:if>
</h1>

What I want to do is to replace <a> with <span> - see:

<h1 class="http://post-title entry-title"http://>
    <b:if cond="http://data:post.link"http://>
        <span expr:href="http://data:post.link"http://><data:post.title/></span>
    <b:else/>
    <b:if cond="http://data:post.url"http://>
        <span expr:href="http://data:post.url"http://><data:post.title/></span>
    <b:else/>
        <data:post.title/>
    </b:if>
    </b:if>
</h1>

When you do this, it will disable the click on the article title, but the link will remain visible to the search engines.

This method is wrong, can it hurt the page's SEO or is there no problem?

    
asked by anonymous 22.08.2014 / 16:11

2 answers

3

It's wrong, yes. This is not valid HTML because the span element does not have the href attribute. I'm not an SEO expert, but I'd say that the chances of searchers ignoring your links are quite high.

    
22.08.2014 / 16:30
3

If what you want and undo to the action of the <a> element use javasctipt event.preventDefault () and keep your HTML correct. Links are of the utmost importance to get a good SEO, but for a good quality page always try to use the elements for the functions for which they were created. Now if the link does not point to any important page of the site, then you can change and should change. Do not forget to take the href attribute.

    
22.08.2014 / 17:01