Mobile app version of vmapp.org
Login or Join
Shanna517

: SEO link's anchor text - does it matter if is it plain or in other tag? Description I will give below some links examples in HTML code: <a href="./add.php?page=1" target="_blank"><div

@Shanna517

Posted in: #Html #Links #Seo

Description

I will give below some links examples in HTML code:

<a href="./add.php?page=1" target="_blank"><div class="menu-button" id="menu-btn-3">Add</div></a>
<a href="/index.php?page=2"><button type="button" class="button" style="background-color: rgb(32, 32, 32);">Next</button></a>

<a href="./profile-added.php?page=1" target="_blank">Add</a>


Two first links contains as anchor text div and button tags, which consecutive have also anchor text, but in plain form.

Third of examples is just normal link with plain anchor text.

Problem to solve

Using example with nonplain anchor text would affect my SEO rankings? Should I use third option instead to eventually improve my rankings?

Plus:
If I ve this type of link:

<a><img /><a>


Is it more crawler friendly to give anchor text to link tag or only leave alt tag with description of image?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shanna517

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Only very bad search engines (if any at all) would have a problem with child elements of a, as it’s very common and useful. Essentially it’s not different to other elements having child elements.

However, you should only use valid child elements:


button (or any other "interactive content" element) is not allowed
div (or any other block-level element) is only allowed in (X)HTML5 (but probably many older search engines can handle this, too, as it was not an uncommon error in HTML 4.01 times)


But elements like span, b, i, em, strong, code, img, abbr, etc. (and block elements in (X)HTML5) should be fine.

If links containing an img should have anchor text or not depends on the actual content: in some cases you want/need additional text, in other cases you don’t. However, you should never duplicate the information given in the alt attribute.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme