Linking to non-HTML files

The New Zealand Government Web Usability Standard requires that links to non-HTML files be accompanied by information indicating the file’s format and size.


A link's text should give users a good indication of what to expect if they activate the link. This is especially useful in the case of links to non-HTML files, e.g. image files, PDFs, Microsoft Office or OpenDocument files, audio or video files, etc. A link to a non-HTML document should provide information about the document. This information includes a meaningful name, the file format, and file size.

Viewing or working with non-HTML files very often requires the use of other software or a plugin. Non-HTML files can also vary drastically in size. Downloading a large file can have a serious impact on one's mobile data plan, or take an extremely long time over a dial-up connection. In such cases, a user may prefer to avoid doing so.

Informing users up front about a file's format and size allows them to make an informed decision about whether or not to download it. Should they choose to download it, an indication of what type of application or plugin they will need to use the file is is helpful, as is providing an extra link to any plugin(s) required to use the file.

Providing useful link text as described above can also help screen reader users. Screen reader software typically enables the user to call up a list of all the links on a page for quicker access. Since, in this view, each link is removed from its surrounding page context, it can be difficult to determine the link's purpose if the link text alone does not make the target of the link clear.


When providing file format and size information for a link to a non-HTML file, the preferred approach is to include that information directly in the link text itself. An alternative approach is to make sure that the information comes immediately before or after the link. For example,