Meta Tags

  • The <meta> tags go in the head of every webpage.
  • We use them for setting the character encoding and viewport settings, as well as connecting to other related files.
  • Here are some common ones:
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta
  http-equiv="Content-Security-Policy"
  content="default-src 'self' data: gap: ws: https://ssl.gstatic.com; 
    style-src 'self' https://fonts.googleapis.com; 
    font-src 'self' data: https://fonts.gstatic.com;
    media-src *; 
    img-src 'self' data: content:;"
/>

<meta name="robots" content="noindex" />
<meta name="geo.position" content="45.5678;-75.4321" />
<meta name="geo.placename" content="Ottawa" />
<meta name="description" content="Website about how to design webpages" />
<meta name="keywords" content="HTML,CSS,JavaScript" />
<meta name="author" content="https://twitter.com/prof3ssorSt3v3" />

Always include the meta tags for charset, viewport, and content-security-policy.

Last Updated: : 8/26/2019, 2:39:05 PM