HTML Meta Tags and Their Uses
Meta Tag Usage
<meta charset='UTF-8'> Defines character encoding (UTF-8 recommended).
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
Ensures responsiveness on mobile devices.
<meta http-equiv='X-UA-Compatible' content='IE=edge'> Forces the latest IE rendering engine.
<meta name='description' content='Short summary of webpage'>
Improves search engine ranking.
<meta name='robots' content='index, follow'> Controls search engine indexing and link following.
<meta property='og:title' content='Page Title'> Title when shared on Facebook.
<meta property='og:description' content='Page Description'> Description for Facebook sharing.
<meta property='og:image' content='URL'> Image preview when shared on social media.
<meta name='twitter:card' content='summary_large_image'> Enhances Twitter sharing with a rich preview.
<meta http-equiv='Content-Security-Policy' content="default-src
Prevents
'self'">XSS attacks by enforcing security policies.
<meta name='mobile-web-app-capable' content='yes'> Enables full-screen mode for mobile apps.
<meta name='theme-color' content='#000000'> Sets the theme color for mobile browsers.
<meta http-equiv='refresh' content='5;url=[Link]
Redirects page after a certain time.
<meta name='language' content='en-US'> Defines the language of the webpage.