And TITLE And ALT - HTML & CSS - SitePoint Forums Trang chủ » Html5 Link Alt Text » And TITLE And ALT - HTML & CSS - SitePoint Forums Có thể bạn quan tâm Html5 Listeleme Html5 Listeler Html5 Listen Html5 Radio Player Code Html5 Radio Player Free <a href=''> and TITLE and ALT HTML & CSS DoubleDee August 31, 2014, 2:46am 1 After reading the HTML4 specs, I was surprised to see there is no ALT or TITLE attributes… Is there a way that I can offer those for a hyperlink? Sincerely, Debbie RyanReese August 31, 2014, 3:34am 2 HTML offers global attributes which anchors are allowed to use. IIRC alt is not allowed since no alternative text can be given. However, title attribute is allowed - it is a global attribute. I know title=“” works because I’ve done it in the past and it is a global attribute which anchors support. TechnoBear August 31, 2014, 9:24am 3 As Ryan says, you can use “title” on most elements, including links. “alt” is to provide alternative text for an image. You might find these helpful: HTML & CSS - SitePoint HTML – Learn HTML, HTML5, Boilerplate & more Learn HTML - HTML5 canvas, video SVG and forms, plus boilerplate and more with online tutorials & tips from the experts HTML & CSS - SitePoint HTML – Learn HTML, HTML5, Boilerplate & more Learn HTML - HTML5 canvas, video SVG and forms, plus boilerplate and more with online tutorials & tips from the experts John_Betong August 31, 2014, 10:04am 4 I find the title attribute limiting and far more flexible to have hidden spans that are revealed when hovered. Also title does not allow linefeeds but revealed spans accept \r\ along with borders. I also believe that the verbose span content helps with your SEO Brownie Points. Beware this is a mouse only feature and unfortunately does not work on tablets and smartphone. I am not sure about the SEO benefits but no doubt another poster can enlighten me with their opinions and thoughts:) 1 Like RyanReese August 31, 2014, 11:39am 5 I do not believe there is much, if any benefit for those in terms of SEO. I agree with this article. http://ezinearticles.com/?Do-Alt-and-Title-Attributes-Help-With-SEO?&id=432783 John_Betong August 31, 2014, 12:00pm 6 The hidden spans I had in mind were neither alt nor title attributes but precede the</a> tag. Is the initial span {display: none} ignored by search engines and also are they considered “Black Hat” techniques? TechnoBear August 31, 2014, 12:01pm 7 [ot]This thread seems to be wandering off-topic; SEO was not part of the original question. But as the question’s been asked: Google: Googlebot processes each of the pages it crawls in order to compile a massive index of all the words it sees and their location on each page. In addition, we process information included in key content tags and attributes, such as Title tags and ALT attributes. Googlebot can process many, but not all, content types. For example, we cannot process the content of some rich media files or dynamic pages. In-Depth Guide to How Google Search Works | Google Search Central... Get an in-depth understanding of how Google Search works and improve your site for Google's crawling, indexing, and ranking processes. Also: http://googlewebmastercentral.blogspot.co.uk/2007/12/using-alt-attributes-smartly.html I can’t find any reference to Google using title attributes (as opposed to the title meta tag). [/ot] PaulOB August 31, 2014, 12:30pm 8 Title attributes on the anchor tag are valid and occasionally useful and [URL=“http://www.nngroup.com/articles/using-link-titles-to-help-users-predict-where-they-are-going/”]have been for years. More info: http://www.w3.org/TR/WCAG20-TECHS/H33.html However the bottom line is that if the information is important then it should be in real text and not the title text. Only informative text should be provided via the title attribute but the link itself should be self evident as to its purpose which why the usal “click here” is frowned upon and is says nothing about where you are going. Don’t use the title attribute just because you didn’t have room in the html for what you really wanted to say. A better method would be hiding the text offscreen in a span and showing that as a tooltip as John suggests above. DoubleDee August 31, 2014, 2:08pm 9 Paul_O_B: Title attributes on the anchor tag are valid and occasionally useful and [URL=“http://www.nngroup.com/articles/using-link-titles-to-help-users-predict-where-they-are-going/”]have been for years. More info: http://www.w3.org/TR/WCAG20-TECHS/H33.html However the bottom line is that if the information is important then it should be in real text and not the title text. Only informative text should be provided via the title attribute but the link itself should be self evident as to its purpose which why the usal “click here” is frowned upon and is says nothing about where you are going. Don’t use the title attribute just because you didn’t have room in the html for what you really wanted to say. A better method would be hiding the text offscreen in a span and showing that as a tooltip as John suggests above. When a person is viewing a Private Message, in the header, I have a hyperlink with varying text, e.g. Incoming Folder, Sent Folder, Trash Folder. (The idea being, that you can go back to the parent folder when you are done reading the message.) Off Topic: Yeah, it would have been nice if I would have had the folders off to the left like every other messaging system for the past 20 years, but I just didn’t have time to build that in!! Anyways… So I wanted to see if adding additional cluing text (e.g. “Go to Incoming Folder”, “Go to Sent Folder”, “Go to Trash Folder”) would be okay. I see your point, Paul, and agree, but don’t know if I feel guilty with my links or adding an additional TITLE hint. If a person was a purist, they would say, “Well, Debbie, your links should say ‘Go to Incoming Folder’” but I think that extra text is unnecessary for most users, and yet to help those who need a little more of a clue, I thought adding a TITLE thingy might help?! (BTW, after I posted my OP, it dawned on me that using ALT for a hyperlink would be senseless!) Hope all of this makes sense… Sincerely, Debbie RyanReese August 31, 2014, 4:16pm 10 John_Betong: The hidden spans I had in mind were neither alt nor title attributes but precede the</a> tag. Is the initial span {display: none} ignored by search engines and also are they considered “Black Hat” techniques? I do believe Google punishes websites for doing this - you will notice that this method is almost non-existent for websites trying to cram SEO in. TechnoBear August 31, 2014, 4:22pm 11 RyanReese: I do believe Google punishes websites for doing this - you will notice that this method is almost non-existent for websites trying to cram SEO in. What Google objects to is “cloaking” - trying to show different content to human visitors and search bots. I doubt they’d have any problem with this technique - used in moderation, of course, and only where it’s of benefit to the humans. John_Betong August 31, 2014, 4:39pm 12 RyanReese: I do believe Google punishes websites for doing this - you will notice that this method is almost non-existent for websites trying to cram SEO in. Interesting point and I will investigate tomorrow and also Paul’s suggestion recommended by W3.Org for “Using CSS to hide a portion of the link text”. Google Webmaster Tools has not mentioned or reduced my SEO Brownie Points for using this technique? Off Topic: Off to bed for an early night because it is Launch Day tomorrow for Sitepoint’s New Forum!!! RyanReese August 31, 2014, 4:55pm 13 TechnoBear: What Google objects to is “cloaking” - trying to show different content to human visitors and search bots. I doubt they’d have any problem with this technique - used in moderation, of course, and only where it’s of benefit to the humans. Of course - that’s why I mentioned websites trying to cram in SEO - meaning what you are saying, that they only punish for those cramming in SEO :). John_Betong: Interesting point and I will investigate tomorrow and also Paul’s suggestion recommended by W3.Org for “Using CSS to hide a portion of the link text”. Google Webmaster Tools has not mentioned or reduced my SEO Brownie Points for using this technique? Off Topic: Off to bed for an early night because it is Launch Day tomorrow for Sitepoint’s New Forum!!! Yay!! happycodings September 4, 2014, 8:04pm 14 A link with a title attribute <?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>A link with a title attribute - see the tooltip when you hover over the link</title> </head> <body> <p><a href="http://www.example.com" title="Programming Code Examples">anchor text</a>.</p> </body> </html> 1 Like Related topics Topic Replies Views Activity Use "ALT" or "TITLE" Which one? Get Started 18 1039 November 30, 2010 Using span display:none to hide text for seo? Marketing 14 8211 March 1, 2011 Two questions about alt and title Marketing 5 557 September 29, 2014 Too Much Accessibility: titles titles titles everywhere Accessibility 8 2404 October 8, 2014 Implement title-attribute on linking image HTML & CSS 4 918 October 8, 2014 Từ khóa » Html5 Link Alt Text Is It Correct To Use Alt Tag For An Anchor Link? - Stack Overflow Links Must Contain Either Text Or An Image With Alt Text - IT Accessibility HTML Alt Attribute - W3Schools HTML Area Alt Attribute - W3Schools H30: Providing Link Text That Describes The Purpose Of A Link For ... - W3C Adding Alt-tags To Links - 'How To' Guides - Web Editors' Handbook Image ALT Tag Tips For HTML - Accessibility At Penn State What Should The ALT Text Be For An Image That Is Also A Link? Why An HTML Image Alt Text Doesn't Show On Hover - Computer Hope Alternative Text - WebAIM HTML Img Alt Tags For SEO Best Practice - Search Engines Love ... The Rules Of ALT » - HTML Requiring The Alt Attribute In HTML5 - Juicy Studio How Do I Show Alt Text When Hovering Over An Anchor With A Mouse?