Here are some commonly used meta tags in HTML, along with their purposes:
-
Character Encoding:
<meta charset="UTF-8">- Specifies the character encoding for the HTML document, ensuring proper display of text.
-
Description:
<meta name="description" content="A brief description of the webpage.">- Provides a summary of the page's content, which can be used by search engines for indexing and displaying in search results.
-
Keywords:
<meta name="keywords" content="HTML, CSS, JavaScript">- Lists keywords relevant to the page content, although its importance for SEO has diminished over time.
-
Author:
<meta name="author" content="Your Name">- Specifies the name of the author of the document.
-
Viewport:
<meta name="viewport" content="width=device-width, initial-scale=1.0">- Controls the layout on mobile browsers, ensuring responsive design.
-
Robots:
<meta name="robots" content="index, follow">- Instructs search engine crawlers on how to index the page (e.g., whether to index the page or follow links).
-
Refresh:
<meta http-equiv="refresh" content="30">- Automatically refreshes the page after a specified number of seconds.
-
Content-Type:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">- Specifies the content type and character set of the document.
These meta tags provide essential information about the webpage to browsers and search engines, enhancing usability and SEO.
