Do <span>'s and <a href="E"> have the same SEO backlink capability?

Do <span>'s and <a href="E"> have the same SEO backlink capability? What I mean is that does the Google crawler recognize them both as backlinks that will increase the ranking of the linked website?

To be more clear:
is this --> <span> bing.com </span> the same as this --> <a href="bing.com"> bing.com </a>

I can’t imagine it will do anything of the sort <span> does not a URL make. It does NOT have a href=“” attribute for starters.

2 Likes

That would surprise me if Google considered a span as an anchor.

EDIT)
@chrisofarabia beat me to the punch. :slight_smile:

1 Like

I mean like a link inside a span tag. My bad.

If anything I would not recommend writing broken web pages. However, since such “pseudo links” would only work with JavaScript doing what the browser does naturally with proper anchors, I suppose you could use

What is your use case for wanting to do such a thing?

EDIT
In that case anchors will be considered anchors regardless of what their parent element is.

1 Like

@paulmcburney9,

Would you please restate your original question by presenting the working code for both examples.

Revised /
To be more clear:
is this --> <span> bing.com </span> the same as this --> <a href="bing.com"> bing.com </a>

One is an anchor link, the other is a text URL, not a link.

1 Like

@paulmcburney9 , thank you for the clarification.

The <span> is simply and inline container element that allows one to add or modify certain presentational qualities to inline items such as text. Other than being an inline element, it has no anchor qualities (therefore offers no SEO benefit).

There are many links that describe HTML elements.

Mozilla offers more technically complete descriptions:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span

W3Schools (a business that is not affliated with the W3C organization) provides a ton of easy to read definitions and usage examples.
https://www.w3schools.com/

There are many other online reference sites, especially for CSS properties.

https://tympanus.net/codrops/css_reference/

https://www.w3schools.com/cssref/default.asp

While developing or modifying a web page, check the code frequently for errors with the validator. It’s much easier to fix an error early than it is to repair or rewrite an entire site later.

http://jigsaw.w3.org/css-validator/

https://validator.w3.org/nu/

Google is your friend…
but always beware of outdated sites showing old code techniques.

This is my test page which demonstrates several of the points that my colleagues have already mentioned by simply putting the code that you wanted to compare onto a page (or pages) by itself. Most of the time, one can satisfy his questions by consulting reference sites on the web and writing simple stand-alone test pages.

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>anchor</title>
<!--
https://www.sitepoint.com/community/t/do-span-s-and-a-href-e-have-the-same-seo-backlink-capability/347874/8
-->
    <style>
a,span {
    display:block;
    margin:1em 0;
}
    </style>
</head>
<body>

<p>
anchors and spans are inline elements.  They normally align in a row.  (You can comment out the above CSS to see that happen.) 
I have assigned "a" and "span" {display:block} so each will start on a new line and given them a top and bottom margin so there will be additional space between the lines.
</p>

<span>bing.com 1</span>
<span>www.bing.com 2</span>
<span>http://www.bing.com 3</span>

<a href="bing.com">bing.com 1</a>
<a href="www.bing.com">www.bing.com 2</a>
<a href="http://www.bing.com">http://www.bing.com 3</a>

<a href="bing.com">bing.com 1</a>
<a href="www.bing.com">bing.com 2</a>
<a href="http://www.bing.com">bing.com 3</a>

<p>In this bare bones example, only when the full URL is within the href property does the anchor link to Bing.</p>

In the following line you can see that span does not allow the href attribute
[quote="chrisofarabia, post:2, topic:347874"]
It does NOT have a `href=“”` attribute
[/quote]
<span href="http://www.bing.com">bing.com 3</span>

</body>
</html>

If SEO is your thing, then you can read Google’s SEO reference that explains how they read sites and/or look up a few SEO sites such as
https://www.shoutmeloud.com/backlink.html

Always remember that valid HTML and good content matter more than SEO tricks.

4 Likes