🎨 HTML / CSS Intermediate

What are HTML meta tags and what are they used for?

Answer

HTML meta tags in the <head> provide metadata about the page — information not displayed on the page but used by browsers, search engines, and social platforms. Key meta tags: <meta charset="UTF-8"> declares the character encoding. <meta name="viewport" content="width=device-width, initial-scale=1"> is critical for responsive design — it tells mobile browsers to use the device's actual width rather than zooming out to a virtual 980px viewport. <meta name="description" content="..."> provides the snippet text for search results. Open Graph tags (<meta property="og:title"> etc.) control how links appear when shared on social media.