Content guide - PDFs and other non-HTML documents

HTML is the code for creating web pages. We avoid all non-HTML documents, including PDFs.

If you're designing content that people will read on a screen, create it as structured web pages in HTML.

If you want people to edit the content in a document, publish it in an Open Document Format (ODF). Read GOV.UK guidance on using Open Document Formats.

You may be breaking the law if you publish a PDF or other non-HTML document without an accessible version.

The problem with PDFs

We avoid PDFs because:

  • they cannot meet the range of users' accessibility needs, for example, users cannot change colours or font size
  • they usually give people a poor user experience, especially on mobile
  • many browsers, tools and extensions do not work with them – they often have problems with zoom, scroll, audio, image and keyboard navigation
  • they make it difficult for users to navigate to the rest of the website
  • they may take users away from the website, opening in a new tab, window or software – and not all users have the right software
  • they are hard to maintain and update, so users may get out of date and unreliable content
  • if users find PDFs in search results, they get them without any supporting context or material, such as who the publisher is
  • search engines may not rank PDFs as highly in search results as HTML pages
  • it's difficult to collect data on how people use PDFs, and that makes it difficult to identify problems and improve them

Creating new PDFs

Creating a new PDF document is a last resort and you should avoid it unless there is a specific user need for it. You should always provide an HTML version too.

Rare cases where you might need a PDF

We may publish a PDF as well as an HTML page:

  • for niche audiences, where there is a clear user need for special formats (like Easy Read or foreign language leaflets designed to be printed out)
  • for other downloads designed for printing, such as posters
  • downloads of reports or publications designed to be published on paper
  • where there's a legal or regulatory requirement to have a formal, signed document
  • to preserve a permanent record for the future

Make PDFs accessible

If you have to create a new PDF, it must meet WCAG 2.1 to level AA.

If you create your PDF correctly and save it in PDF/A (archiving) format, it can meet WCAG 2.1 AA. (Follow the GOV.UK guidance on publishing accessible documents.)

PDFs must have

  • a logical structure based on tags and headings
  • meaningful document properties, for example, a descriptive title for assistive technology
  • readable body text
  • good colour contrast
  • text alternative for images

However, there is still no guarantee that your PDF content will meet the accessibility needs of your users. Structured HTML pages are more accessible.

Older PDFs and non-HTML documents

Before 23 September 2018

It's OK to keep non-HTML documents, including PDFs, created before 23 September 2018 as long as you're no longer using them for business processes, such as forms.

After 23 September 2018

If you created or still use any non-HTML documents for business processes after 23 September 2018, you should do 1 of the following:

  • keep the content up to date and replace them with an HTML page or give users an HTML alternative
  • delete them

Linking to PDFs

It's better to link to HTML pages containing PDF content rather than to PDFs themselves. This makes it easier for users to find the latest information if the PDF is replaced.

Linking to an HTML page also makes it easier to measure user journeys and analyse website use.

Read more about how to handle links, including linking to PDFs.

Help us improve this guidance

Share insights or feedback and take part in the discussion. We use GitHub as a collaboration space. All the information on it is open to the public.

Read more about how to feedback or share insights.

If you have any questions, get in touch with the service manual team.

Updated: February 2022