1. Home
  2. Docs
  3. SiteLint
  4. Quality Rules
  5. missing-charset


Print this article


This rule determines if the charset is set for HTML and if it’s defined within the first 1024 bytes of the HTML.


Always declare the encoding of your document using a meta element with a charset attribute, or using the http-equiv and content attributes (called a pragma directive). The declaration should fit completely within the first 1024 bytes at the start of the file, so it’s best to put it immediately after the opening <head> tag.

How to fix it

  • Define <meta charset="utf-8"/> or <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> within the first 1024 bytes at the start of the file. Ideally immediately after the opening <head> tag


SiteLint, Quality, Best Practice

Was this article helpful to you? Yes No
SiteLint Audits: Monitoring in real-time Accessibility, Performance, Privacy, Security, SEO, Runtime Errors and Console Logs