Favicons are small icons displayed in a browser's tab, bookmark, or favorite list. They help users easily identify a website.
Prepare the Image
.ico, .png, .svg.Generate Favicons Using RealFaviconGenerator
Insert HTML Code
Add the following code in the <head> section:
<head>
<link rel="icon" type="image/png" href="./favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
<link rel="shortcut icon" href="./favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png" />
<link rel="manifest" href="./site.webmanifest" />
</head>
OG tags, developed by Facebook, control how website content is previewed when shared on social media platforms.
<head>
<meta property="og:title" content="Page Title">
<meta property="og:description" content="Page description">
<meta property="og:image" content="https://www.example.com/image.jpg">
</head>
og:title and og:description. og:image is high-resolution.The CSS Box Model defines how elements are displayed and spaced on a webpage. Every HTML element is treated as a box with four layers:
.box {
width: 300px;
height: 200px;
padding: 20px;
border: 2px solid black;
margin: 30px;
}
box-sizing)Defines how the total size of an element is calculated.
content-box: Width and height include only the content (default). border-box: Width and height include padding and border..box-content {
box-sizing: content-box;
width: 300px;
padding: 20px;
border: 10px solid black;
}
.box-border {
box-sizing: border-box;
width: 300px;
padding: 20px;
border: 10px solid black;
}
The float property removes elements from the normal document flow, aligning them to the left or right. Text or inline elements flow around the floated element.
.image {
float: left;
margin-right: 10px;
}
The clear property prevents elements from being affected by preceding floated elements.
.container {
clear: both;
}
For a backend developer, understanding web basics like the Box Model or OG tags can significantly improve collaboration with frontend teams. For example, when implementing a feature that dynamically generates HTML for product previews, knowing how OG tags affect social media previews ensures your API delivers the right meta-data. This not only enhances user experience but also streamlines communication between frontend and backend during development.