Skip to content

HTML

  1. Approach
    1. HTML-only users MUST be treated as first-class citizens (Service standard - Progressive enhancement)
  2. Style
    1. All HTML for National Archive applications MUST adhere to the HTML5 standard
    2. The <html> element SHOULD have a lang attribute
    3. The lang attribute on the <html> element SHOULD be en
    4. The <title> element SHOULD either follow the pattern [page] - [service] - The National Archives or [page] - The National Archives
    5. All tags MUST be closed, even where HTML5 might allow them not to be (as is the case for <li> and <p> tags)
    6. Full attribute syntax MUST be used and all attributes quoted (see the W3C description of quoted attribute syntax)
    7. All tag names and attributes MUST be written in in lower case
    8. HTML SHOULD be properly indented to reflect its structure
    9. Optional tags MUST be used
  3. Accessibility
    1. Services MUST follow the TNA Accessibility standards

Images

Acceptable file formats for images are:

Format Extention MIME type Purpose
JPEG .jpg image/jpeg General purpose images
WebP .webp image/webp General purpose images
PNG .png image/png Images requiring lossless-ness or transparency (prefer SVG)
SVG .svg image/svg+xml Logos, icons and fonts

WebP

  • WebP images MUST be served with a JPEG fallback

SVGs

Videos

Acceptable file formats for videos are:

Format Extention MIME type
MP4 .mp4 video/mp4
WebM .webm video/webm

To use embedded media, refer to YouTube.

Player

Our chosen video player, plyr is due to be deprecated.

Use plyr until a suitable replacement is found.