A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-meta-tag/ below:

HTML <meta> Tag - GeeksforGeeks

HTML <meta> Tag

Last Updated : 11 Jul, 2025

A meta tag in HTML is an element that provides metadata about the HTML document. Metadata is data that describes other data, and in this case, it helps search engines and browsers understand how to handle or display content. The <meta> tag does not appear directly on the webpage, but it provides information to search engines, browsers, and other services that interact with the page.

Syntax:

<meta name="name_of_the_meta_tag" content="value_of_the_meta_tag">

In this syntax:

Now, let us understand with the help of the example:

HTML
<head>
  <meta charset="UTF-8">
  <meta name="description" content="Latest tech news, tutorials, and reviews on gadgets and software.">
  <meta name="keywords" content="tech, gadgets, software, reviews, tutorials">
  <meta name="author" content="Pushkar">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

In the example above:

Meta tags are always placed within the <head> section of an HTML document. The content inside a meta tag is not displayed on the page, but it helps browsers, search engines, and other web services understand how to process and display the webpage.

1. Character Encoding Meta Tag

The character encoding <meta> tag specifies the character set used to display the page. This is essential for ensuring that all text, including special characters, is displayed correctly.

<meta charset="UTF-8">
2. Description Meta Tag

The description <meta> tag provides a short, relevant description of the webpage. This is often used by search engines to display a snippet of the page in search results. The description should be concise and accurately reflect the content of the page.

<meta name="description" content="Free Web tutorials for HTML and CSS">
3. Keywords Meta Tag

The keywords <meta> tag allows webmasters to specify keywords relevant to the page’s content. While this tag was once heavily used for SEO purposes, it has become less important in modern search engine algorithms.

<meta name="keywords" content="HTML, CSS, JavaScript">

The author <meta> tag specifies the author of the webpage. While this tag doesn't directly impact SEO, it is useful for providing credit to the creator.

<meta name="author" content="John Doe">
5. Viewport Meta Tag

The viewport <meta> tag is essential for making webpages mobile-friendly. It controls the layout on mobile devices by defining the width and scale of the page to fit different screen sizes.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
6. Refresh Meta Tag

The refresh <meta> tag automatically reloads or redirects a webpage after a certain period. This functionality is not as commonly used today, with JavaScript offering more control over page reloading and redirection.

<meta http-equiv="refresh" content="30">

The information provided by meta tags is important for search engine optimization (SEO). Although the meta keywords tag is less impactful today, the description and viewport tags remain highly relevant for SEO.

Browsers Support Conclusion

The <meta> tag is a tool for web developers which provides an essential information that helps browsers, search engines, and other services understand and display a webpage correctly. By properly using meta tags like description, keywords, author, and viewport, you can enhance your website's SEO, make it mobile-friendly, and provide a better user experience.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4