Mobile app version of vmapp.org
Login or Join
Lee4591628

: Importance of 'href' attribute within an I am aware of the 'content is king' seo rule, but I'm also wondering whether empty <a> HTML elements is a relatively big downside regarding SEO.

@Lee4591628

Posted in: #Anchor #Html #Javascript #Seo

I am aware of the 'content is king' seo rule, but I'm also wondering whether empty <a> HTML elements is a relatively big downside regarding SEO.

To be more precise and actually cut to the chase, I want to use this javascript plugin kirkas.ch/ascensor/#/Home for a site. As you can observe, the "navigation bar" (bottom right) uses empty <a> elements for navigation.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

3 Comments

Sorted by latest first Latest Oldest Best

 

@YK1175434

Somewhat aside from the discussion, you might want to make certain that your navigation is clear and informative, giving a good indication to your users what is expected, and where the navigation is going to take them. Primarily, this is to reduce user confusion... the navigation at the plugin's site is what would be labeled "mystery meat navigation" ... if it takes too long for users to figure out how to get around your site (even if it is one page with nifty animations), they are unlikely to stick around for very long.

10% popularity Vote Up Vote Down


 

@Yeniel560

The example site uses <a> tags without an href attribute. However, when you click any of them, the page URL actually changes to #/Implementation for example. Therefore, that should be in the link, i.e. <a href="#/Implementation">link</a>

Now if Javascript is disabled or doesn't load for whatever reason, the links still work and should allow the user to navigate to a certain section. (They would probably just be one after the other, similar to any other in-page anchors.)

If you really don't want to use an href then the items shouldn't be links. Use a button or just a plain div/span that reacts to click events.

To answer the question about SEO - it doesn't really make a difference. This is really a one page site as all the content for the "pages" or "slides" is in the HTML. The only small thing is if you use the hash links as described above, you might have them show up as "site links" in Google. They sometimes show in-page anchor links as site links so you can jump straight to the relevant section (Wikipedia articles are a good example for that).

10% popularity Vote Up Vote Down


 

@Cooney921

Let's simplify things a bit: Your pages can all be syntactically valid or well-formed with empty anchor tags, but if your links between pages depend completely on javascript there will be a downside as most crawlers will not be able to follow your navigation.

Of course you can have a sitemap.xml that links to every page, you can have lot's of external links referencing your pages and so on, but you just add more effort than necessary. If you want to reach the greatest number of visitors try to make your site as accessible as possible.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme