Alt and Title Attributes in Anchor Tags
-
Does it hurt to use alt and title attributes inside an anchor tag? Example:
-
That was a good catch Alan and Ryan, I just looked at the Alt and Title and did not even notice the example used them in an anchor. Doh! I would only ever use them in images. Since I develop on the Microsoft platfrom using it anywhere other than img flags a syntax error.
-
Everyone's partially correct. Alternate attributes are for images only. Title attributes in anchor tags can be used in links, however if you are performing SEO best practices, using title attributes in anchor tags is a first signal that you are probably spamming the search engines if not used with extreme caution.
Why? Because the anchor text (the text you wrap the anchor tag around) should suffice to communicate what you're linking to. Title text in anchors is best left to only be used when you're using them as a place anchor on a page, not as a link.
-
To clarify: Alt attributes should not be used in anchor tags, but titles can be. For a full list of anchor tag attributes see: http://www.w3schools.com/tags/tag_a.asp
-
Agreed.
-
Quite the opposite, these are very desirable if used for their intended purpose.
The Alt tag is for accessability handling, so it helps people with visual disabilities to understand the content of a picture.
The Title tag is used to provide tooltip information to the user when they hover over the image.
Both these enhance the user experience as thus are looked on favourably by Google.
BUT, it's an important but - seo's in the past would stuff these tags with useless spammy content. e.g. You have a automotive business so the alt tag:
'car gmh fast cars sports cars red cars porsche' that is bad.
'Our new sporty red porsche makes an easy ride through the windy roads of Denmark' - good
The title tag could say 'Porsche 911 2005 touring the roads of Denmark'
It's all about adding value to the site for the user not manipulating the search engines. So, use alt tag to describe the item in detail and the title to provide extra details. Do not have the same text in both as they have different purposes.
Hope that sheads enough light on the subject.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Seeing URL Slugs as search result titles
I've been seeing some search results for my site that look like the first result here, where the URL slug is used as SERP title: https://drive.google.com/a/fitsmallbusiness.com/file/d/0B37y4RslpuY-a0hQYjlJQ0NxeFJicDF6RVlURFVSNFN0aGhB/view?usp=sharing The article title (and Yoast snippet title) are both "28 Press Release Examples From The Pros", but for some reason I'm seeing "press-release-examples" in the search results. I've seen this for multiple articles, and I see it now and then with different articles. I'm aware that Google often changes the titles in search results, but it seems very weird to me that they would opt for just the URL slug here. Thoughts? Has anyone else seen this issue? Any idea what might be causing this? All help much appreciated.
Technical SEO | | davidwaring0 -
Canonical Tags on Parameter Pages With Hreflang
Hey Everyone: We are currently implementing hreflang tags on our site, and we have many parameter pages with hreflang tags; however, I am afraid these may be counted as duplicate content without canonical tags. example.com/utm_source=tpi href='http://example.com/de" hreflang="de" rel="alternate" href='http://example.com/nl" hreflang="nl" rel="alternate" href='http://example.com/fr" hreflang="fr" rel="alternate" href='http://example.com/it" hreflang="it" rel="alternate" I have two questions 1. Do I need a canonical tag pointing to example.com ? 2. On the homepage without the parameter, should I add self referencing hreflang tags? (href="http://example.com/" hreflang="es" Thanks so much for your help! Kyle
Technical SEO | | TeespringMoz0 -
Missing Titles?
Hi All, Don't know if anyone can help me but Moz is showing lots of errors for my website for not having title tags for pages when they do? Also when a user refines they search results it is seeing every instance of this as a new page - we have canonical tags across the site to stop this happening yet it is still occurring each time - is there anything else we can do to resolve this problem? It's creating lots of errors for us. Thanks, Laura
Technical SEO | | Citybase0 -
H-tags and Page Name best practice
For the past few months I've been working on a new site launch, but have been left with a couple of annoyances from my predecessor.. I've got a couple of questions about best practise (and if it's worth changing now). For reference, a good example page is http://polestars.net/hen-party/life-drawing-hen-party/ H-tags The (external) web designer has insisted that wrapping the logo in an H1 tag (with the same branded H1 text on every page), and using an H2 for the actual title of the page is fine. I really don't believe him, but at the same time, feel like maybe google is smart enough to discern the theme of a page in this structure. Is it worth having this changed so that the actual title is the first H1? Page naming convention Another annoyance that I've been left with is the fact that every product page is named the same "burlesque hen party", "life drawing hen party", "whatever hen party"... It looks a little weird, but my real concern is that as we now have 60 "hen party" links in the navigation menu of a bunch of our pages, this may be seen as keyword stuffing - is this a real concern, or am I overthinking it?
Technical SEO | | AlecPR0 -
For Google + purposes, should the author's name appear in the Meta description or title tag of my web site just as you would your key search phrase?
Relative to Cyrus Shepard's article on January 4th regarding Google's Superior SEO strategy, if I'm the primary author of all blog articles and web site content, and I have a link showing authorship going back to Google Plus, is a site wide link from the home page enough or should that show up on all blog posts etc and editorial comment pages etc? Conversely, should the author's name appear in the Meta description or title tag of my web site just as you would your key search phrase since Google appears to be trying to make a solid connection with my name, and all content?
Technical SEO | | lwnickens0 -
How to handle this specific duplicate title issue
Part of my website is a directory of companies. Some of the companies have mane locations in the same city. For these listings titles and url's are like this: 1. Company ABC - Miami, FL http://www.website.com/florida/miami/company-abc-10001 2. Company ABC - Miami, FL http://www.website.com/florida/miami/company-abc-10002 What is the best way to fix this problem? Thank you
Technical SEO | | Boxes0 -
Page title vs page element
Hello! I'm new to SEO as my question would imply. Can someone show me the difference between a page title and a page element? Thank you!
Technical SEO | | atrenary1