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
-
I have a Category and Tag In My Blogs
I have use category and Tags in my blogs. Now i have an problem with blog URL and Tags URL. My blog URLs is also show in Tags page and both the content is same. For Example: My Blog URL is: https://www.example.com/advice-how-to-do-batting And Tag Page URL is : https://www.example.com/advice-batting in that - https://www.example.com/advice-how-to-do-batting The URLs contain same content. No should i write two different meta title and description for above two URLs pages. As there might more blog added under Tags pages with different topics and title. Request on Thought Please.
Technical SEO | | ProcessSEO0 -
Issues with sitelnks anchor text
Hi Everyone, I'm currently running a job classified ad site, and having some problems with my brand site links. So in short, when I type my brand some sitelinks appear which is OK, but there is one that has the anchor text as "1", yep just a number one, as far as I know, Google takes the anchor text from internal linking, and since this the landing page for my search site.com/search-jobs I don't want to demote it. Now I started checking why the number "1" is actually showing and I figured it out it might be due to pagination, since the search results (?=page2, ?=page3, etc) were all linking from the bottom numbers to site.com/search-jobs with the almighty number 1, I took a decision on changing that link to site.com/search-jobs?page=1 and adding a canonical tag to the landing page to avoid duplicated content. The solution worked for a few days for private sessions only (anchor text was Search for jobs in Peru), but after that number 1 came back and I can't figure it out how to change it, tried to update the cache on search console on most pages that still had the previous version but to no avail. My boss and I are trying to fix this issue but no luck yet, should I update all of my pages' cache?, any help would be much appreciated.
Technical SEO | | JoaoCJ0 -
Page Title Displaying differently on Google
Hi i am wondering why page title is display differently on google search. The combination of words that are being displayed on google are not on the page and the page title is simply "Camera Filters", however the page is showing as "our range of Camera Filters" (with the same capitalisation). http://awesomescreenshot.com/0cf4r09y27 I have optimised the age as best i can so it removes the OUR RANGE OF preface, however no luck. Any info would be appreciated. Cheers
Technical SEO | | andrewlos0 -
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 -
Which is better Title length vs. keywords?
We run a jobboard. The title tag on a page for a job is often over 70 characters. An example of one would be: " Supplier Quality Inspector (Electrical Manufacturing) Job in Orlando, FL 32809 at Pro Image Solutions | Orlando Jobs!" The company name 'Orlando Jobs!" comes at the end but is also a really good keyword e.g. 'Orlando' and 'Jobs' I am interested in suggestions as to how to make these titles better. For example take off the company name when we go over 70 characters? Move the company name to the front of the title because the company name is also good keywords? I am looking for the best way to handle the issue is all. Thanks.
Technical SEO | | JobBiz0 -
Totally confused by titles being too long!
We use a wordpress site and have tried some SEO plug-ins in the past. In the analysis, I am getting more than 2,000 pages have titles that are too long and from the results it looks like it was a result of one of these past SEO plug-ins. Do I need to go through and change all those titles? How bad is it that so many of the old blog posts are too long? Some are too long only in the archive link... So confused and hating the idea of reworking thousands of posts! Thanks y'all!
Technical SEO | | Longsphoto0 -
Header Tag Question
While reviewing code on a site, I found the following: <h1 class="<a class="attribute-value">logo</a>"> <a id="<a class="attribute-value">logo</a>" href="[http://siteexampleh1.com](view-source:http://dmbinc.com/)"><span>Example of most important content on this page- Companyspan>a> h1> Is this the correct way to place code for an h1 tag? The content is cached within the page and is hidden to the viewer. The content that is assigned as the h1, is a logo. Majority of code I have been reviewing does not use this setup. The code would instead read as ( This is heading 1 ). Can anyone provide insights on this? Thanks!
Technical SEO | | jfeitlinger0 -
Duplicate title tags and meta description tags
According to GWT, it seems that some of the pages on my website have duplicate title and meta tags. The pages identified by Google are nothing but dynamic pages: http://www.mywebsite.com/page.php
Technical SEO | | sbrault74
http://www.mywebsite.com/page.php?param=1
http://www.mywebsite.com/page.php?param=2 The thing is that I do use the canonical link tag on all pages. Should I also use the "robots noindex" tag when the page is invoked using a GET parameter? Again sorry for my english. Thank you, Stephane1