1

What is preferred method to link PDF(with icon) on a page in terms of semantic, accessibility, usability and SEO?

for example

  • this is a name of PDF "01ccc5.pdf" but inside PDF this is the title of PDF "How to search in long PDF" Should i use PDF subject as a file name like "How-to-search-in-long-PDF?
  • and I want to show link of PDF as a PDF icon on the page, What is the best way in terms of accessibility and usability.
  • Should i insert pdf icon as a inside or i should use as a css background?

Which method is better? this

a{text-indent:-99999px}

<a href="How-to-search-in-long-pdf.pdf" title="PDF, 25KB, Opens in a new window">
How to search in long PDF 
<img src=pdf-icon.jpg" alt="How to search in long PDF" />
</a> 

or this

  a{text-indent:-99999px;background:url(pdf-icon.jpg);width:32px:height:32px}

or this method http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html

<a href="How-to-search-in-long-pdf.pdf" title="PDF, 25KB, Opens in a new window">
How to search in long PDF </a> 

I have to link multiple PDF


Note:

Title of PDF is also will be available before PDF but without any link

like this:

Title                                      PDF

How to search in long PDF                  PDF icon (with link of PDF)

How to search in long PDF                  PDF icon (with link of PDF)

How to search in long PDF                  PDF icon (with link of PDF)
4

2 に答える 2

0

すべてが CSS にあるため、最後のものが最適です。ただし、IE6 では機能しません。このブラウザーが死んでほしいと思うほど、IE6 はまだよく使用されています。

したがって、特別なクラス (例: a.pdf) で 2 番目のものを使用します。また、ファイル タイプが異なる複数のリンクがある場合は、スプライトを使用します。

編集:負のテキストインデントを使用した理由がわかりました。バックグラウンドで正しく動作するかどうかはわかりません。その場合、私はおそらく をテキスト付きで使用し、imgaltはテキスト コンテンツを使用しないでしょうa。私はほとんどの場合、特にダウンロード リンクにはテキストと画像を使用することを好みます。

于 2010-03-05T06:58:52.707 に答える