Meta Tags in HTML
Meta tags provide metadata about the HTML document. They are placed inside the <head> element and help search engines, browsers, and social media platforms understand your page better.
Common Meta Tags
<meta charset="UTF-8">– Sets the character encoding to UTF-8.<meta name="viewport" content="width=device-width, initial-scale=1.0">– Ensures responsive design on mobile devices.<meta name="description" content="Short summary of your page">– Describes your page for search engines.<meta name="keywords" content="html, web, tutorial">– Lists keywords for search indexing (less used now).<meta name="author" content="Your Name">– Specifies the author of the page.<meta http-equiv="refresh" content="30">– Refreshes the page every 30 seconds (optional).
Example
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn about meta tags in HTML">
<meta name="keywords" content="HTML, meta tags, SEO">
<meta name="author" content="SmartCodingTips">
</head>