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
-
Google ignoring the Title Tag?
Anybody seen this too? We have a webpage with tiny different title tag and H1. If you search for let's say "Renovatie", you get to see the title tag "De kostprijs van je renovatie". However, when you search with the search term "Wat kost een renovatie", we see the H1 title in the SERP, which is "Wat kost een renovatie". So that's normal when you search a term that's exact the same as the H1 tag, Google ignores the title tag? N.
Technical SEO | | nans0 -
Removing a canonical tag from Pagination pages
Hello, Currently on our site we have the rel=prev/next markup for pagination along with a self pointing canonical via the Yoast Plugin. However, on page 2 of our paginated series, (there's only 2 pages currently), the canonical points to page one, rather than page 2. My understanding is that if you use a canonical on paginated pages it should point to a viewall page as opposed to page one. I also believe that you don't need to use both a canonical and the rel=prev/next markup, one or the other will do. As we use the markup I wanted to get rid of the canonical, would this be correct? For those who use the Yoast Plugin have you managed to get that to work? Thanks!
Technical SEO | | jessicarcf0 -
Canonical Tag when using Ajax and PhantomJS
Hello, We have a site that is built using an AJAX application. We include the meta fragment tag in order to get a rendered page from PhantomJS. The URL that is rendered to google from PhantomJS then is www.oursite.com/?escaped_fragment= In the SERP google of course doesnt include the hashtag in the URL. So my question, with this setup, do i still need a canonical tag and if i do, would the canonical tag be the escaped fragment URL or the regular URL? Much Appreciated!
Technical SEO | | RevanaDigitalSEO0 -
Duplicate content or titles
Hello , I am working on a site, I am facing the duplicate title and content errors,
Technical SEO | | KLLC
there are following kind of errors : 1- A link with www and without www having same content. actually its a apartment management site, so it has different bedrooms apartments and booking pages , 2- my second issue is related to booking and details pages of bedrooms, because I am using 1 file for all booking and 1 file for all details page. these are the main errors which i am facing ,
can anyone give me suggestions regarding these issues ? Thnaks,0 -
Duplicate Title - Shopping Website
My website is showing with errors due to duplicate titles, these errors add up to over 150 errors. The problem is a lot of my products are similar, just in different lengths, colors etc. For example
Technical SEO | | adelemaree
http://www.ugg.org.au/en/classic-candy-short-australia-ugg-boots/48-classic-candy-short-australia-ugg-boots-blue.html
http://www.ugg.org.au/en/classic-candy-button-short-australia-ugg-boots/31-classic-candy-button-short-chocolate.html
http://www.ugg.org.au/en/classic-candy-button-short-australia-ugg-boots/28-classic-candy-button-short-black.html How can I avoid this error without having to merge all my products and colors into one page? As that would make my catalogue look too small! Thanks in advance0 -
How do I fix the h1 tag?
No More Than One H1 Tag Easy fix <dl> <dt>Number of H1s</dt> <dd>2</dd> <dt>Explanation</dt> <dd>Best practices for both SEO and accessibility require only a single H1 tag. The H1 is meant to be the page's headline, and thus, multiple H1s are confusing. Consider employing H2, H3 or CSS styles to achieve the same results with text visualization.</dd> <dt>Recommendation</dt> <dd>Remove multiple instances of the H1 tag, so that only one exists on the page.</dd> <dd>I get this error yet it does not tell me how to fix it. I'm not even sure what the H1 tag is?
Technical SEO | | 678648631264
</dd> </dl>0 -
Duplicate Page Titles and Content
I have a site that has a lot of contact modules. So basically each section/page has a contact person and when you click the contact button it brings up a new window with form to submit and then ends with a thank you page. All of the contact and thank you pages are showing up as duplicate page titles and content. Is this something that needs to be fixed even if I am not using them to target keywords?
Technical SEO | | AlightAnalytics0 -
Internal anchor text
Designed my website with one keyword, one page adage. Wondering if i am creating an issue with internal anchor text and use of plurals for keywords. For instance, say I want my index page to rank for keyword exotic vacations, and an inner page to rank for exotic vacation. I do this as i notice there is a major discrepency with google when calling both the singular and plural term of certain keywords (like the example above, for instance). I see in yahoo it views singular and plural as essentially the same word, but google appears to rank them separately. Anyways since google is where the majority of my search traffic comes from, I separated my most competitive keywords for both singular and plural usage and created external links with anchor text that reflects this separation. I am concerned though that I may not be handling the Internal anchor text properly. What i have done is take a keyword l want to rank for (for example "exotic vacations") and attach it a page (for example index page) and use the anchor text "exotic vacations" on this page and link it to the inner page "exotic vacation." Reason: I want to rank for the term exotic vacations on the main page, but have a relavant page to link to this term so the closest would be the keyword exotic vacation on an inner page. I would appreciate any feedback on this. I think I am running into a problem with this strategy especially on the main index page/inner page keywords (plural to singular). I also notice google will find an inner page for a time then switch it to the default domain name index page when searchign for a keyword. Kinda keeps going back and forth. I never see any indent search results.
Technical SEO | | oxygenretreat0