Skip Navigation Bar
NLM logo

Coding Instructions for the National Library of Medicine's Main Website

General Guidelines

Developers should endeavor to follow the guidelines specified on these pages:

Additional Guidelines Based on Specific Circumstances

  1. Package Information for developers whose pages don't live on the NLM main website - NLM Header and Footer
  2. Minimum Specifications for developers whose non-templated pages live on the NLM main website, but don't resemble the NLM main templated pages
  3. Specifications for developers whose non-templated pages live on the NLM main website and want their pages to resemble the NLM Main template pages - NLM Header and Footer

Package Information for developers whose pages don't live on the NLM main website - NLM Header and Footer


Mininum specifications for developers whose non-templated pages live on the NLM main website, but don't resemble the NLM main templated pages

Document Type Declaration and Language Attribute

  • Item: <!DOCTYPE>
    • Required?: Yes
    • Location?: Very first thing in your HTML document, before the <html lang="en"> tag
    • Why needed?: Ensures all pages use the HTML5 Document Type.
    • Code: <!DOCTYPE>

  • Item: <html lang="en">

Meta Tags

  • Item: meta-name viewport tag
    • Required?: Yes
    • Location?: Before the ending </head> tag
    • Why needed?:  Ensures that the browser will scale to the specified viewport
    • Code: <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  • Item: meta-http-equiv tags
    • Required?: Yes
    • Location?: After opening <html> tag
    • Why needed?:  Ensures Proper Encoding
    • Code:
      • <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        • Displays the webpage in EdgeHTML mode, which is the highest standards mode supported by Internet Explorer, from Internet Explorer 6 through IE11.

      • <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      • <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        • Displays the webpage in EdgeHTML mode, which is the highest standards mode supported by Internet Explorer, from Internet Explorer 6 through IE11 and Chrome Frame.
  • Item: Contact email address tag
    • Required?: No, but strongly recommended
    • Location?: Before the ending </head> tag
    • Why needed?:  Allows the NLM broken link checker to send a broken link report to the email address.
    • Code: <meta name="NLM.Contact.Email" content="EMAIL_ADDRESS@something_something.nih.gov" />

Google Tag Manager

  • Item: Google Tag Manager
    • Required?:  No, but encouraged
    • Location: First entry in the <body> tag
    • Why needed: Used to gather more reliable page usage statistics
    • Code: Contact NLM for information about this code.

Skip Navigation

  • Item:
  • Required?: Yes
  • Location: Immediately after the Google Tag Manager Code
  • Why Needed?: Gives users ability to tab directly to page content .
  • Code: <a class="sr-only sr-only-focusable" href="#skip" title="Skip the navigation on this page">Skip Navigation Bar</a>

HTML <body> tag element

  • Required? Yes
  • Location: Immediately after </head> tag.
  • Why Needed?: Required for all HTML files.
  • Code. <body>

Specifications for developers whose non-templated pages live on the NLM main website and want their pages to resemble the NLM main templated pages - NLM Header and Footer

  • NLM staff make an effort to keep the The README page and the files it references consistent with current NLM Main template specifications.

Last Reviewed: October 15, 2020