Monday, 4 Aug 2025
  • My Interests
  • My Saves
  • Try Intents
Subscribe
Focus - Code Reveals
  • Home
  • HTML

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

    By Chief Editor

    What is a Meta Tag in HTML?

    By Chief Editor
    What is Symentic HTML

    What is Symentic HTML?

    By Chief Editor

    Difference between HTML Tag and HTML Element in HTML?

    By Chief Editor

    What is Block level Element and Inline Level Element?

    By Chief Editor

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

    By Chief Editor
  • JavaScript

    What is hoisting in JavaScript with an example?

    By Chief Editor

    What is the Event Loop in JavaScript?

    By Chief Editor

    What is the this Keyword in JavaScript?

    By Chief Editor

    What are the Rest and Spread operators in JavaScript?

    By Chief Editor

    Explain Call, Apply and Bind in JavaScript.

    By Chief Editor

    Difference between document.createElement and document.createElementFragement in JavaScript?

    By Chief Editor
  • Frontend Interview

    What is Block level Element and Inline Level Element?

    By Chief Editor

    What are the Lexical Scope in JavaScript?

    By Chief Editor

    Difference Between position: relative and position: absolute in CSS

    By Chief Editor

    How to Reverse a String in JavaScript: Two Essential Methods

    By Chief Editor

    Is JavaScript a synchronous or asynchronous language?

    By Chief Editor

    What is Symentic HTML?

    By Chief Editor
  • Backend Interview

    Lazy Loading in React.js: Boosting Performance and Reducing Load Time

    By Chief Editor

    What is Flex Box in CSS?

    By Chief Editor

    Explain Deep Copy and Shallow Copy in JavaScript.

    By Chief Editor

    What are the different types of HTML tags?

    By Chief Editor

    What is props drilling in React?

    By Chief Editor

    What are the Lexical Scope in JavaScript?

    By Chief Editor
  • Nodejs
  • JavaScript Interview
  • React Interview
  • Frontend Interview
  • Backend Interview
  • Contact Us
  • Advertise with Us
  • Complaint
  • Cookies Policy
  • Privacy Policy
  • Donate
  • 🔥
  • ReactJS
  • JavaScript
  • JavaScript Interview
  • React Interview
  • HTML
  • Frontend Interview
  • CSS
  • Redux
  • Javascript
  • System Design
Font ResizerAa
Focus - Code RevealsFocus - Code Reveals
  • My Saves
  • My Interests
  • My Feed
  • History
  • Technology
Search
  • Homepage
  • ReactJS
  • JavaScript
  • JavaScript Interview
  • HTML
  • CSS
  • Backend Interview
Have an existing account? Sign In
Follow US
© 2022 Code Reveals Inc. All Rights Reserved.
Home Blog 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 is Arrow and Normal Function in JavaScript?

Arrow Function vs Normal Function in JavaScript In JavaScript, Arrow Functions and Normal Functions (also…

By Chief Editor

What is memoization in JavaScript?

Memoization is an optimization technique used in JavaScript (and other programming languages) to speed up…

By Chief Editor

What is Position in CSS?

In CSS, the position property is used to specify how an element is positioned in…

By Chief Editor

You Might Also Like

What is Symentic HTML
Frontend InterviewHTML

What is Symentic HTML?

By Chief Editor
HTML

Difference between HTML Tag and HTML Element in HTML?

By Chief Editor
Frontend InterviewHTML

What is Block level Element and Inline Level Element?

By Chief Editor
HTML

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

By Chief Editor

Focus by CodeReveals is your dedicated platform for mastering tech interviews and advancing your development skills. Whether you’re aiming to become a Frontend Developer, Backend Developer, or simply preparing for your next big interview, we’re here to guide you every step of the way.

Our mission is to help aspiring developers gain real-world knowledge, build confidence, and succeed in technical interviews. We offer structured content, curated interview questions, coding challenges, and practical guidance — all designed by experienced professionals who understand what top tech companies are looking for.

At Improve, we don’t just teach — we prepare you to think like a developer, solve like an engineer, and present like a pro.

Join us and start improving today — because your dream tech job is within reach

Most Famous
  • HTML
  • CSS
  • JavaScript
  • NodeJS
Top Categories
  • JavaScript Interview
  • React Interview
  • Frontend Interview
  • Backend Interview
Usefull Links
  • Contact Us
  • Advertise with Us
  • Complaint
  • Cookies Policy
  • Privacy Policy
  • Donate

©2025  Code Reveals Inc. All Rights Reserved.

Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?