Websites and applications outside the Drupal environment should follow these requirements when linking to non-HTML resources or native files like PDFs or Word, Excel, and PowerPoint files.

When linking to native files, remember that links to these types of files will not be accessible to site visitors who do not have the native software program or plugin on their system.

See our best practices for optimizing native files, which can be done for all websites in all hosting environments, including the Drupal environment.

Linking to Native Files

When you link to native files, include an icon to indicate the file type. Native files may include:

  • Adobe Reader (.pdf)
  • ZIP files (.zip)
  • Word (.doc, .docx)
  • Excel (.xls, .xlsx)
  • PowerPoint (.ppt, .pptx)
  • Audio, video, and image files

The link text should be descriptive. Use either the name of the file or a phrase that clearly describes what the file is. For example:

  • See the 20% Wind by 2020 report.
  • See the full list of awardees.

Coding Icons

Icons can be added manually or by using a JavaScript.

For example, a link to a PDF can be coded manually as follows:

<a href="/somepdf.pdf">Wind by 2020 report<img src="/images/icon_pdf.gif" alt="PDF"></a>

Include the icon inside the link so it can be read by screen readers.

A Javascript file is available that will add these icons automatically. Contact EERE’s site coordinators to obtain a copy of the script.