Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →To add a favicon and Open Graph (OG) tags, you put a few small image files on your server and a handful of link and meta tags in the head of each page. The favicon is the icon in browser tabs and search results; OG tags control how your link looks when shared on WhatsApp, LinkedIn, Facebook, X and Slack.
This guide gives the minimal file set, the exact tags, the image sizes, and how to test previews and clear stale ones.
Older guides list twenty icon sizes. Modern browsers need far fewer. A practical set is:
| File | Size | Used by |
|---|---|---|
favicon.ico | 32×32 (can contain 16×16 too) | Older browsers, and tools that request /favicon.ico automatically |
icon.svg | Scalable | Modern browsers; stays sharp at any size and can adapt to dark mode |
apple-touch-icon.png | 180×180 | iPhone and iPad home-screen shortcuts |
icon-192.png, icon-512.png | 192×192, 512×512 | Android home screen and installable web apps, via the manifest |
Put these in the <head> of every page:
<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/manifest.webmanifest">
The sizes="32x32" on the ICO helps browsers that support SVG to prefer the SVG. And the manifest file:
{
"name": "My Site",
"icons": [
{ "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
{ "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
]
}
An SVG favicon can include a media query so it changes colour when the browser uses a dark theme:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<style>
circle { fill: #1a56db; }
@media (prefers-color-scheme: dark) { circle { fill: #8ab4f8; } }
</style>
<circle cx="16" cy="16" r="14"/>
</svg>
Google shows your favicon next to your site in mobile and desktop results. Its Search Central guidelines ask for a square image (it recommends larger than 48×48 pixels), a stable URL that Googlebot is allowed to crawl, and an icon that represents your brand. Changes can take time to appear because Google recrawls favicons on its own schedule.
The Open Graph protocol was introduced by Facebook in 2010 and is now read by most platforms that build link previews. Without it, a platform guesses a title and picks a random image from the page, or shows no image at all.
<meta property="og:type" content="article">
<meta property="og:title" content="How to Add a Favicon and OG Tags">
<meta property="og:description" content="The files, tags and image sizes you need.">
<meta property="og:url" content="https://example.com/blog/favicon-og-tags">
<meta property="og:image" content="https://example.com/img/favicon-og-1200x630.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Browser tab with a favicon next to a link preview card">
<meta property="og:site_name" content="Example">
X reads its own twitter: tags and falls back to OG tags for the title, description and image. Usually you only need one extra line to get the large image layout:
<meta name="twitter:card" content="summary_large_image">
https://) for og:image and og:url. Relative paths often fail.Platforms cache previews, sometimes for days. If you replace an image, also change its file name (for example og-v2.png) so caches do not keep the old one.
og:title, og:description, og:url and og:image.og:url matches the page's canonical URL.These tags sit alongside your normal SEO tags. For the rest of the head section, see the on-page SEO checklist for new websites and how to write SEO-friendly blogs. If you are just starting out with HTML, build your first website with HTML and CSS and learn the HTML5 features worth using.
Uncodemy's Full Stack Development course covers HTML, CSS, JavaScript and deployment, including the head tags every production site needs.