Skip to main content
U.S. flag

An official website of the United States government

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Language

Setting the language of your site allows assistive technology to interact with your content correctly. Assistive technology will read foreign languages, but it needs to know the main language of the page and when any content’s language differs from the default language for the page.

Testing

  1. Open the inspector panel.
  2. Locate the main html tag.
    • If the lang attribute isn't set to the correct language, this is a failure.
  3. Identify any content that differs from the default language. Make sure the content has its own lang attribute set with that language.
    • Any alternate language content not set constitutes a failure.

Examples

Failure

Sus ojos son verdes.

This text is Spanish and lacks a lang attribute.

Passes

Sus ojos son verdes.

This text passes because the lang="es" attribute identifies its content as Spanish.

18F Accessibility

An official website of the GSA’s Technology Transformation Services

Looking for U.S. government information and services?
Visit USA.gov