Thursday, 17 Jul 2025
  • My Interests
  • My Saves
  • Try Intents
Subscribe
improve-logo improve-logo
  • Home
  • HTML

    What is the difference between “HTML” and “HTML5”?

    By Chief Editor

    What is Block level Element and Inline Level Element?

    By Chief Editor

    Difference between HTML Tag and HTML Element in HTML?

    By Chief Editor

    What are the different types of HTML tags?

    By Chief Editor

    What is Doctype HTML in HTML?

    By Chief Editor
    What is Symentic HTML

    What is Symentic HTML?

    By Chief Editor
  • JavaScript

    Explain var let and const in JavaScript with Example.

    By Chief Editor

    What is Arrow and Normal Function in JavaScript?

    By Chief Editor

    What are the map, filter, and reduce methods in JavaScript?

    By Chief Editor

    What is one-way data binding in React?

    By Chief Editor

    What is memoization in JavaScript?

    By Chief Editor

    What is hoisting in JavaScript with an example?

    By Chief Editor
  • Frontend Interview

    Difference Between position: relative and position: absolute in CSS

    By Chief Editor

    Is JavaScript a synchronous or asynchronous language?

    By Chief Editor

    Explain Deep Copy and Shallow Copy in JavaScript.

    By Chief Editor

    What is Block level Element and Inline Level Element?

    By Chief Editor

    What are the Lexical Scope in JavaScript?

    By Chief Editor

    What is Position in CSS?

    By Chief Editor
  • Backend Interview

    What are the drawbacks of React?

    By Chief Editor

    What is Synthetic Event?

    By Chief Editor

    How to Reverse a String in JavaScript: Two Essential Methods

    By Chief Editor

    What is NodeJS and its main features?

    By Chief Editor

    What is React Fiber and its importance in react?

    By Chief Editor

    What is middleware, and what is React Thunk?

    By Chief Editor
  • Nodejs
  • Frontend Interview
  • Backend Interview
  • React Interview
  • JavaScript Interview
  • Contacts Us
  • Advertise with Us
  • Complaint
  • Privacy Policy
  • Cookie Policy
  • Donate
  • 🔥
  • ReactJS
  • JavaScript
  • JavaScript Interview
  • React Interview
  • HTML
  • Frontend Interview
  • CSS
  • Redux
  • Javascript
  • System Design
Font ResizerAa
ImproveImprove
  • My Saves
  • My Interests
  • My Feed
  • History
  • Technology
Search
  • Homepage
  • Pages
    • Home
    • Blog Index
    • Contact Us
    • Search Page
    • 404 Page
  • Features
    • Post Headers
    • Layout
  • Personalized
    • My Feed
    • My Saves
    • My Interests
    • History
  • About
  • Categories
    • Technology
  • Categories
Have an existing account? Sign In
Follow US
© 2022 Code Reveals Inc. All Rights Reserved.

Home What is a Meta Tag in HTML?

HTML

What is a Meta Tag in HTML?

Chief Editor
Last updated: May 5, 2025 12:09 pm
Chief Editor
Share
SHARE

A meta tag in HTML is an element that provides metadata (information) about a web page.
Meta tags do not display content on the page; instead, they provide information to browsers, search engines, and other services.

Contents
Why Meta Tags Are Important:Commonly Used Meta Tags and PropertiesDetailed Examples:Complete Example:Key Takeaways:

They are placed inside the <head> section of an HTML document.

Syntax:

<meta name="name" content="value">

Why Meta Tags Are Important:

  • Help search engines understand the page content (SEO).
  • Define the character set of the document.
  • Control viewport settings for responsive design.
  • Specify page descriptions, keywords, author, and more.

Commonly Used Meta Tags and Properties

Meta TagDescriptionExample
CharsetSpecifies the character encoding.<meta charset="UTF-8">
ViewportControls layout and scaling on mobile devices.<meta name="viewport" content="width=device-width, initial-scale=1.0">
DescriptionShort description of the page (SEO).<meta name="description" content="Learn HTML and web development.">
KeywordsList of keywords (less relevant today for SEO).<meta name="keywords" content="HTML, CSS, Web Development">
AuthorSpecifies the author of the document.<meta name="author" content="John Doe">
RobotsInstructs search engines on indexing and following links.<meta name="robots" content="index, follow">
Refresh/RedirectAutomatically refreshes the page after a certain time or redirects.<meta http-equiv="refresh" content="5; url=https://example.com">
Open Graph (Facebook Sharing)Controls how the page appears when shared on social media.<meta property="og:title" content="Learn HTML">
Twitter CardsEnhances the appearance of the page on Twitter.<meta name="twitter:card" content="summary_large_image">

Detailed Examples:

1. Charset Example:

<meta charset="UTF-8">

Ensures proper encoding for special characters like é, ü, ñ.


2. Viewport Example (Responsive Design):

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Ensures the page adapts to different screen sizes (important for mobile devices).


3. Description Example (SEO):

<meta name="description" content="This is a comprehensive guide to HTML for beginners.">

Used by search engines as a summary of the page.


4. Keywords Example (Less Relevant Today):

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

Not heavily used by search engines anymore but can still be useful in some cases.


5. Author Example:

<meta name="author" content="Jane Doe">

Specifies the author of the page.


6. Robots Example:

<meta name="robots" content="noindex, nofollow">

Tells search engines not to index the page or follow any links on it.

ValueMeaning
indexIndex the page
noindexDon’t index the page
followFollow links on the page
nofollowDon’t follow any links on the page

7. Refresh/Redirect Example:

<meta http-equiv="refresh" content="10;url=https://example.com">

Redirects to https://example.com after 10 seconds.


8. Open Graph (for Facebook Sharing):

<meta property="og:title" content="Learn HTML Fast">
<meta property="og:description" content="A quick and easy guide to HTML.">
<meta property="og:image" content="https://example.com/html-guide.png">
<meta property="og:url" content="https://example.com/html-guide">

Defines how the page appears when shared on Facebook.


9. Twitter Cards:

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Learn HTML Fast">
<meta name="twitter:description" content="Quick and easy HTML guide for beginners.">
<meta name="twitter:image" content="https://example.com/html-guide.png">

Enhances page appearance on Twitter.


Complete Example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn HTML from scratch with this beginner-friendly guide.">
<meta name="keywords" content="HTML, Web Development, Coding">
<meta name="author" content="John Doe">
<meta name="robots" content="index, follow">
<title>Learn HTML - Beginner's Guide</title>
</head>
<body>
<h1>Welcome to HTML Guide</h1>
</body>
</html>

Key Takeaways:

  • Meta tags provide information about a webpage to browsers, search engines, and social media platforms.
  • Important for SEO, social media previews, and responsive design.
  • Placed within the <head> section of an HTML document.

Let me know if you need more details or help with anything else! 😊

Share This Article
Email Copy Link Print
Previous Article Difference between HTML Tag and HTML Element in HTML?
Next Article What is Doctype HTML in HTML?
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Stay ahead with real-time updates on the latest events, trends.
FacebookLike
XFollow
InstagramFollow
YoutubeSubscribe
LinkedInFollow
QuoraFollow
- Advertisement -
Ad imageAd image

Popular Posts

What are Benefits in React?

What are the Benefits of Using React? React is a popular JavaScript library for building…

By Chief Editor

What is a Higher-Order Component (HOC) in React?

What is a Higher-Order Component (HOC) in React? A Higher-Order Component (HOC) is an advanced…

By Chief Editor

What are the drawbacks of React?

Understanding the Drawbacks of React: Key Considerations for Developers React is one of the most…

By Chief Editor

You Might Also Like

HTML

What is the difference between “HTML” and “HTML5”?

By Chief Editor
HTML

Difference between HTML Tag and HTML Element in HTML?

By Chief Editor
What is Symentic HTML
Frontend InterviewHTML

What is Symentic HTML?

By Chief Editor
HTML

What are the async and defer attributes in the “script” tag?

By Chief Editor
improve-logo

Code Reveals is a cutting-edge software development company dedicated to delivering high-quality, scalable, and innovative solutions for businesses of all sizes. Our team of expert developers, designers, and engineers specializes in creating custom software, web applications, mobile apps, and enterprise solutions that are tailored to meet the unique needs of our clients.

Most Famous
  • HTML
  • CSS
  • JavaScript
  • Node
Top Categories
  • Frontend Interview
  • Backend Interview
  • React Interview
  • JavaScript Interview
Usefull Links
  • Contacts Us
  • Advertise with Us
  • Complaint
  • Privacy Policy
  • Cookie Policy
  • Donate

©2025  Code Reveals Inc. All Rights Reserved.

Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?