<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mohiyaddeen7</title>
    <description>The latest articles on DEV Community by mohiyaddeen7 (@mohiyaddeen7).</description>
    <link>https://dev.to/mohiyaddeen7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1123237%2F63fd1d27-1abf-466c-a5a1-0d6c94e271dc.png</url>
      <title>DEV Community: mohiyaddeen7</title>
      <link>https://dev.to/mohiyaddeen7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohiyaddeen7"/>
    <language>en</language>
    <item>
      <title>Mastering Error Boundaries in React: Why &amp; How 🚨</title>
      <dc:creator>mohiyaddeen7</dc:creator>
      <pubDate>Sat, 09 Nov 2024 05:07:59 +0000</pubDate>
      <link>https://dev.to/mohiyaddeen7/mastering-error-boundaries-in-react-why-how-1fhf</link>
      <guid>https://dev.to/mohiyaddeen7/mastering-error-boundaries-in-react-why-how-1fhf</guid>
      <description>&lt;h2&gt;
  
  
  Why Use Error Boundaries?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why Use Error Boundaries?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;React applications, like any software, are prone to runtime errors—especially in production. Errors can cause parts of your app to crash, disrupting the user experience. React’s &lt;strong&gt;Error Boundaries&lt;/strong&gt; let you catch these errors gracefully, allowing you to handle them without bringing down the entire application.&lt;/p&gt;

&lt;p&gt;Since React 16, Error Boundaries have helped developers capture errors in the component tree and provide fallback UIs, making your app more resilient.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Error Boundaries? 🤔
&lt;/h2&gt;

&lt;p&gt;By default, if your application throws an error during rendering, React will remove its UI from the screen. To prevent this, you can wrap a part of your UI into an error boundary. Error Boundaries are special components that catch JavaScript errors in their child component tree, log them, and display a fallback UI. They prevent the error from “bubbling up” and crashing the entire app. However, they only catch errors in &lt;strong&gt;lifecycle methods, render methods, and constructors of child components.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Error Boundary
&lt;/h2&gt;

&lt;p&gt;To create an Error Boundary, define a class component with two lifecycle methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;static getDerivedStateFromError(error):&lt;/strong&gt; Update state when an error is caught.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;componentDidCatch(error, info):&lt;/strong&gt; Log the error.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Implementation :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { Component } from 'react';

class ErrorBoundary extends Component {
  constructor(props) {
    super(props);
    this.state = { hasError: false };
  }

  static getDerivedStateFromError(error) {
    // Update state so the next render will show the fallback UI.
    return { hasError: true };
  }

  componentDidCatch(error, errorInfo) {
    // Log the error to an error reporting service
    console.error("Error caught in ErrorBoundary:", error, errorInfo);
  }

  render() {
    if (this.state.hasError) {
      // Render a fallback UI
      return &amp;lt;h1&amp;gt;Oops! Something went wrong.&amp;lt;/h1&amp;gt;;
    }

    return this.props.children; 
  }
}

export default ErrorBoundary;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Usage :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState, useEffect } from 'react';
import ErrorBoundary from './ErrorBoundary';

function UserProfile() {
  const [user, setUser] = useState(null);

  useEffect(() =&amp;gt; {
    // Simulating an error (e.g., a failed API request)
    throw new Error("User data failed to load!");
  }, []);

  return &amp;lt;div&amp;gt;{user ? user.name : "Loading..."}&amp;lt;/div&amp;gt;;
}

function App() {
  return (
    &amp;lt;ErrorBoundary&amp;gt;
      &amp;lt;UserProfile /&amp;gt;
    &amp;lt;/ErrorBoundary&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;In this example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;strong&gt;UserProfile&lt;/strong&gt; throws an error (like an error from useEffect), the &lt;strong&gt;Error Boundary&lt;/strong&gt; will catch it and render the fallback UI.
**&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Scenario 🌍
&lt;/h2&gt;

&lt;p&gt;Imagine you have a dashboard component that displays user data. Occasionally, the API may fail, causing your UserProfile component to throw an error. By wrapping it in ErrorBoundary, you ensure that a friendly message is shown while you troubleshoot the issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limitations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Error Boundaries don't catch errors in event handlers, asynchronous code (like promises), or in code that happens outside the rendering lifecycle.&lt;/li&gt;
&lt;li&gt;If you want to catch errors inside event handlers or asynchronous code in functional components, you would need to wrap those specific operations in try-catch blocks or use a different error handling method (e.g., error boundaries for asynchronous code).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Error Boundaries provide a safety net for handling unexpected errors, letting you manage and recover gracefully. Try adding them around crucial components, especially where data is fetched or critical features are rendered.&lt;/p&gt;




&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/mohiyaddeen-raza" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding✌🏻&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please don't hesitate to ask doubts in the comments section—I'll be sure to respond promptly. Your inquiries are greatly welcomed and will receive a swift and thorough reply.❤️&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Linear Regression : From Theory to Practice</title>
      <dc:creator>mohiyaddeen7</dc:creator>
      <pubDate>Wed, 06 Nov 2024 10:38:51 +0000</pubDate>
      <link>https://dev.to/mohiyaddeen7/linear-regression-from-theory-to-practice-4lli</link>
      <guid>https://dev.to/mohiyaddeen7/linear-regression-from-theory-to-practice-4lli</guid>
      <description>&lt;p&gt;In this guide, we’ll explain &lt;strong&gt;linear regression&lt;/strong&gt;, how it works, and walk you through the process step-by-step. We’ll also cover &lt;strong&gt;feature scaling&lt;/strong&gt; and &lt;strong&gt;gradient descent&lt;/strong&gt;, key techniques for improving your model’s accuracy. Whether you’re analyzing business trends or diving into data science, this guide is a great starting point.&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; Introduction
&lt;/li&gt;
&lt;li&gt; Understanding Supervised Learning
&lt;/li&gt;
&lt;li&gt; What is Linear Regression?
&lt;/li&gt;
&lt;li&gt; Simple Linear Regression
&lt;/li&gt;
&lt;li&gt; Multiple Linear Regression
&lt;/li&gt;
&lt;li&gt; Cost Function
&lt;/li&gt;
&lt;li&gt; Feature Scaling
&lt;/li&gt;
&lt;li&gt; Gradient descent
&lt;/li&gt;
&lt;li&gt; Gradient descent for simple linear regression
&lt;/li&gt;
&lt;li&gt; Gradient descent for multiple linear regression
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Introduction &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Linear regression is a simple yet powerful tool used to understand relationships between different factors and make predictions. For instance, you might want to know how your study hours impact your test scores, how much a house could sell for based on its size and location, or how sales might increase with more advertising. Linear regression allows us to examine data points — like hours studied or advertising spend — and draw a straight line that best predicts an outcome, such as test scores or sales figures. This technique is valuable in many areas, helping us make informed decisions based on data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Supervised Learning &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Before diving into linear regression, it’s essential to understand supervised learning, a machine learning approach that uses labeled data to train models. In supervised learning, we provide the model with training examples that include features (input variables) and their corresponding labels (correct outputs).&lt;/p&gt;

&lt;p&gt;There are two main types of supervised learning tasks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Regression&lt;/strong&gt;: This predicts a continuous value from an infinite range of possible outputs. For example, predicting house prices based on various features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classification&lt;/strong&gt; : This differs from regression by predicting a class or category from a limited set of possible categories. For instance, determining whether an email is spam or not.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is Linear Regression? &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Linear regression is a supervised learning method used in statistics and machine learning to understand the relationship between two types of variables: &lt;strong&gt;independent variables&lt;/strong&gt; (the factors we think influence an outcome) and a &lt;strong&gt;dependent variable&lt;/strong&gt; (the outcome we want to predict).&lt;/p&gt;

&lt;p&gt;The goal is to find the &lt;strong&gt;best-fit&lt;/strong&gt; line that represents this relationship using a &lt;strong&gt;linear equation&lt;/strong&gt;. By analyzing &lt;strong&gt;labeled data&lt;/strong&gt; (data with known outcomes), linear regression helps us understand how changes in the independent variables influence the dependent variable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminology
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcs5e9l9oso7tdu1tnbew.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcs5e9l9oso7tdu1tnbew.png" alt="Common Notation In Machine Learning" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple Linear Regression &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Simple linear regression examines the relationship between one dependent variable and one independent variable. It aims to model the relationship by fitting a straight line to the data points, which can be expressed with the equation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh17o5xify7r03nvsc0o7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh17o5xify7r03nvsc0o7.png" alt="Simple Linear Regression equation" width="744" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In this equation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;y_hat&lt;/strong&gt;(or &lt;strong&gt;f_wb(x)&lt;/strong&gt;) &lt;strong&gt;:&lt;/strong&gt;The dependent variable, which represents the outcome being predicted. This is the value we aim to estimate based on the input from the independent variable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;b :&lt;/strong&gt; This is the intercept of the regression line. It signifies the expected value of the dependent variable y when the independent variable x is zero. The intercept allows the regression line to adjust vertically to better fit the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;w :&lt;/strong&gt; The coefficient of the independent variable x. This coefficient indicates how much the dependent variable y_hat changes for a one-unit change in x. A positive w suggests that as x increases, y_hat​ also increases, while a negative w indicates an inverse relationship.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;x :&lt;/strong&gt; The independent variable, which serves as the predictor in the model. This variable is the input used to estimate the outcome represented by y_hat.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multiple Linear Regression &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Multiple linear regression extends the concept of simple linear regression by examining the relationship between one dependent variable and two or more independent variables. This approach allows us to model more complex relationships and understand how multiple factors influence the outcome.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdz7gykuazj3hnwcxqjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdz7gykuazj3hnwcxqjx.png" alt="Multiple Linear Regression equation" width="800" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;n :&lt;/strong&gt; Total number of features (independent variables)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost Function &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The cost function, also known as the loss function, quantifies the difference between the expected (true) values and the predicted values generated by the model. It measures how well the model performs on a given dataset.In simple linear regression, the most commonly used cost function is the &lt;strong&gt;Mean Squared Error&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzini5ycuw8yzqkj85qkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzini5ycuw8yzqkj85qkj.png" alt="Mean squared error equation" width="800" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;m&lt;/strong&gt; is the number of training examples&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;y_hat&lt;/strong&gt; is the predicted value&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;y&lt;/strong&gt; is the actual or expected value&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feature Scaling &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Feature scaling is a crucial step in the preprocessing of data, especially when working with algorithms that rely on distance calculations or gradient descent optimization, such as linear regression, logistic regression, and support vector machines. The purpose of feature scaling is to standardize the range of independent variables or features in the data to ensure that they contribute equally to the model’s learning process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Techniques for Feature Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mean Normalization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mean normalization involves adjusting the values of features to have a mean of zero.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2bn569os1i21ebhbkk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs2bn569os1i21ebhbkk0.png" alt="Mean normalization equation" width="708" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data ranges from approximately [−1,1] or close to it.&lt;/li&gt;
&lt;li&gt;Sensitive to outliers, which can skew the mean and affect the normalization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Linear Regression&lt;/strong&gt; : Helps in improving convergence during training.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradient-Based Algorithms&lt;/strong&gt; : Neural networks and other gradient-based algorithms often converge faster when data is centered around zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Datasets without Significant Outliers&lt;/strong&gt; : Particularly effective for datasets with similar ranges and no extreme outliers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Min-Max Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Min-Max scaling is a technique used to re-scale features to a fixed range, typically [0,1] or [−1,1].&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftojrk5yqrk4i9awgnllv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftojrk5yqrk4i9awgnllv.png" alt="Min-Max scaling equation" width="728" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fixed Range&lt;/strong&gt; : Scales data to a specific range, usually [0,1].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sensitivity to Outliers&lt;/strong&gt; : It can be affected significantly by outliers, which may distort the scaling of the other values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Image Processing&lt;/strong&gt; : Commonly used in deep learning models like Convolutional Neural Networks (CNN’s), where pixel values are scaled to [0,1].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distance-Based Algorithms&lt;/strong&gt; : Essential for algorithms that rely on distance calculations, such as k-nearest neighbors (KNN), k-means clustering, and support vector machines (SVM), to ensure equal contribution from all features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tree-Based Models&lt;/strong&gt; : Although less critical for tree-based models (like decision trees and random forests) compared to other algorithms, it can still help in scenarios where features have vastly different scales.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Z-Score Standardization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Z-score standardization, also known as standard scaling, transforms features to have a mean of zero and a standard deviation of one. This technique is particularly useful for algorithms that assume normally distributed data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp24fetzk83xbewdmnh7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp24fetzk83xbewdmnh7m.png" alt="Z-score standardization equation" width="800" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;sigma&lt;/strong&gt; is the standard deviation of the feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mean Centered&lt;/strong&gt; : Centers data at zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit Variance&lt;/strong&gt; : Ensures a standard deviation of one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robustness to Outliers&lt;/strong&gt; : More robust compared to Min-Max scaling but still sensitive to extreme outliers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Neural Networks&lt;/strong&gt; : Enhances performance and speeds up convergence during training.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Principal Component Analysis (PCA)&lt;/strong&gt; and &lt;strong&gt;Linear Discriminant Analysis (LDA)&lt;/strong&gt; : Required for these techniques to ensure all features contribute equally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gaussian Naive Bayes&lt;/strong&gt;: Improves classification performance by normalizing input features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Robust Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Robust scaling is a technique used to scale features based on the median and interquartile range (IQR). This method is particularly useful for datasets with significant outliers, as it reduces the influence of these outliers on the scaled values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2r7l7riwvcawwp4r1hw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2r7l7riwvcawwp4r1hw.png" alt="Robust Scaling equation" width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IQR(x)&lt;/strong&gt; is the interquartile range of the feature, defined as the difference between the 75th and 25th percentiles of the training set&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Median Centered&lt;/strong&gt; : Centers the data around the median instead of the mean, making it more resilient to outliers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interquartile Range (IQR)&lt;/strong&gt; : Scales the data using the IQR, which is the difference between the 75th percentile (Q3) and the 25th percentile (Q1) of the training data. This helps preserve the distribution’s robustness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data with Outliers&lt;/strong&gt; : Effective in scenarios where outliers are present.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance&lt;/strong&gt;: Useful in financial datasets that may contain extreme values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environmental Data&lt;/strong&gt; : Applies well to environmental datasets where measurements can vary widely.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Gradient Descent &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Gradient descent is a powerful optimization algorithm used to train machine learning models, including linear regression. Its primary goal is to minimize the error between expected and predicted values.&lt;/p&gt;

&lt;p&gt;Initially, the slope of the cost function may be steep at a starting (arbitrary) point. As the algorithm iterates and updates parameters, the slope gradually decreases, guiding the model toward the lowest point of the cost function, known as the &lt;strong&gt;point of convergence or local minima&lt;/strong&gt;. At this convergence point, the cost function reaches its minimum value, indicating that the model predictions are as close as possible to the actual values. Once the parameters reach this point, further updates yield minimal changes to predictions, demonstrating that the optimization process has effectively identified the best-fitting parameters for the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The process involves the following key steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initialization&lt;/strong&gt; : Start with random values for the model parameters (e.g., the intercept b and coefficients w).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calculate the Gradient&lt;/strong&gt; : Compute the gradient of the cost function with respect to the model parameters. This gradient represents the direction and rate of change of the cost function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update Parameters&lt;/strong&gt; : Adjust the model parameters in the opposite direction of the gradient to reduce the error. The update rule is given by:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate&lt;/strong&gt; : Repeat the process until the changes in the cost function are minimal or a specified number of iterations is reached.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;TIPS&lt;/strong&gt; : Plot iterations (x-axis) versus cost (y-axis). If the plot shows a smooth, downward trend, your implementation is likely correct.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8k3b84x3vmgvz0237aay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8k3b84x3vmgvz0237aay.png" alt="gradient cost versus iterations plot" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Gradient Descent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Batch Gradient Descent&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advantages&lt;/strong&gt; : Provides a stable and accurate estimate of the gradient since it uses the entire dataset. It can converge directly to the global minimum for convex functions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt; : Can be very slow for large datasets since it processes all samples in every iteration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt; : Often used in scenarios where the dataset is small enough to fit in memory, such as linear regression or logistic regression on tabular data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stochastic Gradient Descent (SGD)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advantages&lt;/strong&gt; : Faster updates since it processes one sample at a time, which can lead to quicker convergence. It can help escape local minima due to its inherent noise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt; : Convergence is more erratic and may oscillate around the minimum, making it less stable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt; : Commonly applied in online learning scenarios, real-time prediction, or when dealing with large datasets that cannot be processed in their entirety, such as training neural networks on image data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mini-batch Gradient Descent(MBD)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advantages&lt;/strong&gt; : Combines the advantages of both batch and stochastic gradient descent. It leads to faster convergence than batch gradient descent and more stable convergence than SGD. It can also leverage vectorization for efficient computation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt; : Choosing the size of the mini-batch can be challenging and may affect convergence speed and stability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Cases&lt;/strong&gt; : Frequently used in deep learning applications, especially when training on large datasets, such as image classification tasks in convolutional neural networks (CNN's) or natural language processing models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Gradient Descent for Simple Linear Regression &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gradient Descent Steps for Simple Linear Regression&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initialization&lt;/strong&gt;
Start with initial values for the model parameters. These values can be chosen randomly or set to zero.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fifamnrm35vfi1s9snt4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fifamnrm35vfi1s9snt4h.png" alt="initialization gradient descent for simple linear regression" width="800" height="37"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Calculate the Gradient&lt;/strong&gt;
Compute the gradient of the cost function with respect to the model parameters. This gradient represents the direction and rate of change of the cost function.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynd7cshafkh3dngncocf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynd7cshafkh3dngncocf.png" alt="calculate the gradients in gradient descent for simple linear regression" width="800" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18682sn1vdu7hurdj5yq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18682sn1vdu7hurdj5yq.png" alt="calculate the gradients in gradient descent for simple linear regression" width="800" height="81"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Update Parameters&lt;/strong&gt; 
Adjust the model parameters in the opposite direction of the gradient to reduce the error. The update rule is given by:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq57ubesuljfytrjjh1t7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq57ubesuljfytrjjh1t7.png" alt="update parameters in gradient descent for simple linear regression" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzx7corx7i6tsust8q3rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzx7corx7i6tsust8q3rc.png" alt="update parameters in gradient descent for simple linear regression" width="800" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;J(w, b)&lt;/strong&gt; is the cost function, which is the mean squared error (MSE) used above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alpha&lt;/strong&gt; is the learning rate, a small positive number between 0 and 1. It controls the size of the step that gradient descent takes downhill to reach the point of convergence or a local minimum.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TIPS :&lt;/strong&gt; Start with a small learning rate (e.g., 0.01) and gradually increase it. If the cost decreases smoothly, it’s a good rate. If it fluctuates or diverges, reduce the learning rate. A learning rate that’s too large can cause gradient descent to overshoot, never reach the minimum, and fail to converge.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Iterate&lt;/strong&gt; : Repeat the process until the changes in the cost function are minimal or a specified number of iterations is reached.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Python Implementation of Gradient Descent for Simple Linear Regression
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mohiyaddeen7/MachineLearning/blob/main/Linear%20Regression/SimpleLinearRegression.py?source=post_page-----031e4f3dc08c--------------------------------" rel="noopener noreferrer"&gt;Python Implementation of Gradient Descent for Simple Linear Regression&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gradient Descent for Multiple Linear Regression &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gradient Descent Steps for Multiple Linear Regression&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initialization&lt;/strong&gt;
Begin with random values for each parameter, including the intercept b and the weights w for each feature.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19a8kayz4twj7ui7u5jg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19a8kayz4twj7ui7u5jg.png" alt="initialization gradient descent for multiple linear regression" width="800" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Calculate the Gradients&lt;/strong&gt;
Compute the gradient of the cost function with respect to the model parameters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lrt1n6gvhdf8zq8a6kt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lrt1n6gvhdf8zq8a6kt.png" alt="calculate the gradients in gradient descent for multiple linear regression" width="800" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tf1pebcb8jsjm03is8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tf1pebcb8jsjm03is8t.png" alt="calculate the gradients in gradient descent for multiple linear regression" width="800" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vector Form&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flaebtnxu094gpvgntywk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flaebtnxu094gpvgntywk.png" alt="calculate the gradients in gradient descent for multiple linear regression" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhg5hi4m4pwzjw0e89zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhg5hi4m4pwzjw0e89zy.png" alt="calculate the gradients in gradient descent for multiple linear regression" width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;x_subscript_j_superscript_i&lt;/strong&gt; is the j_th feature of the i_th training example&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;x_superscript_T&lt;/strong&gt; is the transpose of vector x&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Update Parameters&lt;/strong&gt;
Adjust the model parameters in the opposite direction of the gradient to reduce the error. The update rule is given by:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqg33avhnc8d88ewgy9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqg33avhnc8d88ewgy9t.png" alt="update parameters in gradient descent for multiple linear regression" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Iterate&lt;/strong&gt;
Repeat the process until the changes in the cost function are minimal or a specified number of iterations is reached.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Python Implementation of Gradient Descent for Simple Linear Regression
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mohiyaddeen7/MachineLearning/blob/main/Linear%20Regression/MultipleLinearRegression.py?source=post_page-----031e4f3dc08c--------------------------------" rel="noopener noreferrer"&gt;Python Implementation of Gradient Descent for Simple Linear Regression&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!!&lt;/strong&gt; 💫 In this post, we’ve explored the fundamentals of linear regression and multiple linear regression, walked through the process of implementing gradient descent, and discussed key techniques like feature scaling to optimize model performance. By understanding how to initialize model parameters, compute gradients, and iteratively update weights, you’re now well-equipped to implement linear regression algorithms and boost their performance on real-world datasets.&lt;/p&gt;

&lt;p&gt;Whether you’re working with simple linear regression or navigating the complexities of multiple features, mastering gradient descent and grasping its core principles will significantly enhance your ability to develop accurate and efficient machine learning models. Keep experimenting, refining your skills, and embracing the learning process — it’s just as important as the results themselves!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stay tuned for more insights into machine learning techniques and web development topics. Happy learning as you continue exploring and building smarter models!&lt;/strong&gt; 💫💫&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's connect on&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/mohiyaddeen-raza/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; 🚀&lt;/p&gt;

&lt;p&gt;"This article was originally posted on &lt;a href="https://medium.com/@mohiyaddeenraza7/linear-regression-from-theory-to-practice-031e4f3dc08c" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, where I share more insights on data analysis, machine learning, and programming. Feel free to check it out and follow me there for more content!"&lt;/p&gt;

&lt;p&gt;Please Like, Share and Follow 🙏.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feel free to ask any questions in the comments section—I'll respond promptly and thoroughly to your inquiries. Your doubts are warmly welcomed and will receive swift and comprehensive replies. ❤️&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>🎨 The Ultimate Guide to Web Design : (Typography, colors, icons, images, shadows, border, white space, and visual heirarchy)</title>
      <dc:creator>mohiyaddeen7</dc:creator>
      <pubDate>Wed, 09 Aug 2023 16:06:15 +0000</pubDate>
      <link>https://dev.to/mohiyaddeen7/the-ultimate-guide-to-web-design-rules-and-best-practices-creating-exceptional-user-experiences-35oe</link>
      <guid>https://dev.to/mohiyaddeen7/the-ultimate-guide-to-web-design-rules-and-best-practices-creating-exceptional-user-experiences-35oe</guid>
      <description>&lt;p&gt;Hello, fellow developers and designers! Are you ready to take your web design skills to the next level? In this post, we'll dive into 10 essential web design rules that can help you create outstanding user experiences. Whether you're a seasoned pro or just starting out, these principles will serve as a solid foundation for crafting visually appealing and user-friendly websites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's get started🚀&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prioritize User-Centered Design:&lt;/strong&gt; Forge connections by understanding your users' needs, preferences, and behaviors. Craft interfaces that resonate and cater to their unique experiences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Effective Typography:&lt;/strong&gt; Choose readable fonts and sizes. Use typography to convey hierarchy and guide users through your content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Psychology of Colors:&lt;/strong&gt; Delve into the psychology of colors. Understand how different colors evoke emotions, influence behavior, and shape user perceptions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High-Quality Imagery:&lt;/strong&gt; Images can speak louder than words. Use high-quality visuals that align with your brand and enhance the user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unleash the Power of Icons:&lt;/strong&gt; Discover the impact of icons. Use them to enhance user understanding, convey information succinctly, and inject personality into your design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Magic of Shadows:&lt;/strong&gt; Explore the Allure of shadows. Employ subtle drop shadows to create depth, contrast, and realism, adding a touch of elegance to your design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Curves of Elegance Mastering Border Radius:&lt;/strong&gt; Discover the allure of border radius. Play with rounded corners to soften edges, create visual interest, and add a touch of elegance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use White Space Wisely:&lt;/strong&gt; White space, or negative space, gives your design room to breathe. It enhances readability and guides users' focus.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual Hierarchy:&lt;/strong&gt; Arrange elements strategically to guide users' attention. Use size, color, and placement to establish a clear visual hierarchy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nurturing an Exceptional User Experience (UX):&lt;/strong&gt; UX is at the heart of design. Craft intuitive navigation, minimize friction, and ensure every interaction delights users, fostering a seamless and enjoyable experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Prioritize User-Centered Design &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;When it comes to web design, the concept of giving a website a personality is a powerful way to establish a unique and memorable online presence. Just like people, websites can convey distinct personalities that resonate with users, evoke emotions, and leave a lasting impression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's an overview of the different website personalities you can consider:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Serious/Elegant:&lt;/strong&gt; Channeling luxury and refinement, this personality is characterized based on thin serif typefaces, golden or pastel colors, and big high-quality images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimalist/Simple:&lt;/strong&gt; Embracing simplicity, this personality centers around the essential text content, using small or medium-sized sans-serif black text, lines, and few images and icons&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plain/Neutral:&lt;/strong&gt; Design that gets out of the way by using neutral and small typefaces, and a very structured layout. Common in big corporations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bold/Confident:&lt;/strong&gt; Makes an impact, by featuring big and bold typography, paired with confident use of big and bright colored blocks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Calm/Peaceful:&lt;/strong&gt; For products and services that care, transmitted by &lt;br&gt;
calming pastel colors, soft serif headings, and matching images/illustrations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Startup/Upbeat:&lt;/strong&gt; Widely used in startups, featuring medium-sized sans-serif typefaces, light-grey text and backgrounds, and rounded element&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Playful/Fun:&lt;/strong&gt; Colorful and round designs, fueled by creative elements like hand-drawn icons or illustrations, animations, and fun language&lt;/p&gt;




&lt;h2&gt;
  
  
  Effective Typography &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In the realm of design, effective typography plays a pivotal role in conveying messages, setting the tone, and guiding users through content. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use only good and popular typefaces and play it safe: &lt;strong&gt;Serif,sans-serif&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It’s okay to use just one typeface per page! If you want more, limit to 2 typefaces.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vxuan65e2nrrgr6zhep.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vxuan65e2nrrgr6zhep.gif" alt="google fonts illustration" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Serif Typeface :&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates a traditional/classic look and feel&lt;/li&gt;
&lt;li&gt;Conveys trustworthiness&lt;/li&gt;
&lt;li&gt;Good for long text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Popular Serif Fonts :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Playfair+Display?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Playfair Display&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Lora?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Lora&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Roboto+Slab?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Roboto Slab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Merriweather?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Merriweather&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Cardo?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Cardo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Aleo?category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Aleo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Cormorant?query=co&amp;amp;category=Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Cormorant&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sans-serif typeface :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modern look and feel&lt;/li&gt;
&lt;li&gt;Clean and simple&lt;/li&gt;
&lt;li&gt;Easier to choose for beginner designer!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Popular Sans-serif Fonts :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Open+Sans?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Open Sans &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Roboto?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Roboto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Lato?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Lato&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Montserrat?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Montserrat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Inter?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Inter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Work+Sans?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Work Sans &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fonts.google.com/specimen/Poppins?category=Sans+Serif&amp;amp;sort=popularity" rel="noopener noreferrer"&gt;Poppins&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;FONT SIZES AND WEIGHTS :&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When choosing font-sizes, limit choices! Use a “type scale” tool or other per-defined range.&lt;/li&gt;
&lt;li&gt;Use a font size between 16px and 32px for “normal” text&lt;/li&gt;
&lt;li&gt;For long text (like a blog post), try a size of 20px or even bigger&lt;/li&gt;
&lt;li&gt;For headlines, you can go really big (50px+) and bold (600+), depending on personality&lt;/li&gt;
&lt;li&gt;For headlines, you can go really big (50px+) and bold (600+), depending on personality&lt;/li&gt;
&lt;li&gt;Keep responsiveness in mind. Utilize relative units like "em" or "rem" for font sizes to ensure they adapt well to different screen sizes and maintain a harmonious visual balance across devices.&lt;/li&gt;
&lt;li&gt;Aim for a line length that falls within the range of 50 to 75 characters for optimal readability. Lines that are too short can make the text appear fragmented, while lines that are too long can strain the reader's eyes and make it challenging to maintain focus.&lt;/li&gt;
&lt;li&gt;Proper line spacing (line height) improves legibility. Set line height to around 1.4 to 1.6 times the font size, allowing content to breathe and reducing eye strain.&lt;/li&gt;
&lt;li&gt;Don’t center long text blocks. Small blocks are fine&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Good Design :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sgma7j1scmxj6vfyou1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sgma7j1scmxj6vfyou1.png" alt="Good Design Illustration" width="637" height="877"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad Design :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftao2cah0hbrebrtnjfc4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftao2cah0hbrebrtnjfc4.png" alt="Bad Design Illustration" width="637" height="877"&gt;&lt;/a&gt;&lt;br&gt;
In both designs, we have designed it with a font size of 16 px and a line height of 1.6, but the difference is that in the &lt;strong&gt;good design&lt;/strong&gt;, we have not centered text blocks as text blocks are big, therefore it is comparatively better than the &lt;strong&gt;bad design&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Psychology of Colors &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Colors have a profound impact on human emotions, perceptions, and behaviors, making them a powerful tool in design and communication. Understanding the psychology of colors can help you create visually compelling and emotionally resonant experiences. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's a glimpse into how different colors influence our perceptions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Red :&lt;/strong&gt; draws a lot of attention, and symbolizes power, passion, and excitement. Making it suitable for calls to action and high-impact elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blue :&lt;/strong&gt; is associated with peace, trustworthiness, and reliability. Often used by brands aiming to convey professionalism and stability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yellow :&lt;/strong&gt; Radiates warmth, optimism, and cheerfulness. It can promote positivity and draw attention, but excessive use may lead to visual strain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Green :&lt;/strong&gt; Symbolizes growth, harmony, and nature. Often associated with health, wealth, and sustainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purple :&lt;/strong&gt; Represents luxury, creativity, and spirituality. Darker shades can evoke elegance, while lighter shades exude whimsy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Orange :&lt;/strong&gt; Signifies enthusiasm, vitality, and friendliness. It can create a sense of excitement and encourage action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pink :&lt;/strong&gt; Conveys sweetness, playfulness, and femininity. It's often used to target a youthful or romantic audience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Black :&lt;/strong&gt; Symbolizes sophistication, power, and formality. Can add an air of mystery and elegance to design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;White :&lt;/strong&gt; Represents purity, simplicity, and cleanliness. Creates a sense of space and can be used to highlight other colors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Brown :&lt;/strong&gt; Reflects earthiness, stability, and reliability. Often associated with natural and organic themes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi color :&lt;/strong&gt; Vibrant combinations can evoke playfulness and diversity, while harmonious combinations create a sense of balance.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Maintain a focused color palette to prevent overwhelming users with excessive colors.&lt;/li&gt;
&lt;li&gt;Align the main color with your website's personality to evoke the desired emotional response.&lt;/li&gt;
&lt;li&gt;A balanced color palette includes at least two essential colors: a main color and a complementary gray shade.&lt;/li&gt;
&lt;li&gt;As your expertise grows, consider introducing accent (secondary) colors to add depth and vibrancy (use color tools for precision).&lt;/li&gt;
&lt;li&gt;Enhance diversity by crafting lighter and darker variations (tints and shades) of your chosen colors.&lt;/li&gt;
&lt;li&gt;Use your main color to draw attention to the most important elements on the page&lt;/li&gt;
&lt;li&gt;Elevate design impact by using colors to highlight specific components or sections, creating visual interest. &lt;/li&gt;
&lt;li&gt;Opt for legibility by avoiding overly heavy or completely black text. Experiment with lighter tones to invite readability.&lt;/li&gt;
&lt;li&gt;Strike a balance: Avoid making text too light, ensuring proper contrast with the background. Leverage tools to confirm a contrast ratio of at least 4.5:1 for standard text and 3:1 for larger text (18px+).&lt;/li&gt;
&lt;li&gt;Ensure your chosen color palette remains consistent across various platforms and devices. Consistency fosters brand recognition and a seamless user experience, whether users are accessing your website on a desktop, tablet, or smartphone.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklb7w59j58l0lgq5it4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fklb7w59j58l0lgq5it4z.png" alt="color illustration" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See how Yellow as my main color Radiating warmth and cheerfulness. And drawing attention.&lt;/p&gt;




&lt;h2&gt;
  
  
  High-Quality Imagery &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In the realm of web design, the use of high-quality imagery can transform a mundane interface into a captivating visual journey. These carefully selected visuals have the power to evoke emotions, convey messages, and create a memorable impression. Here's how to harness the potential of high-quality imagery to enhance user experience:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Every image should tell a story or convey a message that aligns with your brand or content. Thoughtful imagery can captivate users and draw them into your narrative.&lt;/li&gt;
&lt;li&gt;Select images that align with your brand's values, personality, and aesthetic. Consistency in imagery strengthens brand recognition and recall.&lt;/li&gt;
&lt;li&gt;High-quality images convey professionalism and attention to detail. Blurry or pixelated visuals can detract from your website's credibility.&lt;/li&gt;
&lt;li&gt;While high-quality imagery is essential, optimize images for web to ensure they load quickly. Large file sizes can slow down your website, affecting user experience.&lt;/li&gt;
&lt;li&gt;Whenever possible, use original imagery that sets your website apart. Custom visuals can reinforce your brand's uniqueness.&lt;/li&gt;
&lt;li&gt;Ensure images are responsive and adapt to different screen sizes. Responsive images prevent distortion and ensure a consistent experience.&lt;/li&gt;
&lt;li&gt;Incorporating images of real people is a compelling strategy to evoke user emotions and establish a genuine connection.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Types of images with respect to web design and development :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Photographs:&lt;/strong&gt; Real-life images captured through photography. They can depict products, people, places, and events, By incorporating these visuals, your website gains a sense of genuineness and realism.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvw9aeqwocd6egs20n3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvw9aeqwocd6egs20n3w.png" alt="Photographs" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Illustrations:&lt;/strong&gt; Hand-drawn or digitally created visuals that add a unique and artistic touch to your design. Illustrations can simplify complex concepts or contribute to a playful atmosphere.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eq659uq1suojrysalum.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eq659uq1suojrysalum.png" alt="Ilustration" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hero Images:&lt;/strong&gt; Large, attention-grabbing images placed prominently at the top of a webpage. Hero images often include text and call-to-action buttons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjqeautxbuyo06q6juhi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjqeautxbuyo06q6juhi.png" alt="Hero Images" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Product Images:&lt;/strong&gt; High-quality visuals showcasing products from various angles. Product images are essential for e-commerce websites to help users make informed purchase decisions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcrrn87e4rvqe1rdi85g6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcrrn87e4rvqe1rdi85g6.png" alt="Product images" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interactive Images:&lt;/strong&gt; Images with interactive elements, such as clickable hot-spots or hover effects. They engage users and provide additional information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2m7ua0s11ln7ze650w1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2m7ua0s11ln7ze650w1.gif" alt="interactive image" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background Patterns:&lt;/strong&gt; Repeating images used to create textured or patterned backgrounds. Patterns can add depth and visual interest to a webpage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decorative Images:&lt;/strong&gt; Images used for visual appeal, such as dividers, borders, or ornaments. They enhance the aesthetics of a webpage without conveying specific content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stock Images:&lt;/strong&gt; Professionally captured images available for licensing. Stock images are a convenient option when you need visuals but lack original content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important, useful, and powerful tools related to images:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free High Quality Stock Images :&lt;/strong&gt; &lt;a href="https://unsplash.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Unsplash&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free High Quality Stock Images :&lt;/strong&gt; &lt;a href="https://www.pexels.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pexels&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Beautiful Illustrations :&lt;/strong&gt; &lt;a href="https://www.drawkit.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;DrawKit&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Free Illustrations :&lt;/strong&gt; &lt;a href="https://undraw.co/" rel="noopener noreferrer"&gt;&lt;strong&gt;unDraw&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ultimate image optimizer that allows you to compress and compare images with different codecs in your browser :&lt;/strong&gt; &lt;a href="https://squoosh.app/" rel="noopener noreferrer"&gt;&lt;strong&gt;Squoosh&lt;/strong&gt;&lt;/a&gt; can reduce file size and maintain high quality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Unleash the Power of Icons &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Icons, those small yet impactful visual elements, possess a remarkable ability to enhance user experiences and convey information efficiently. By strategically integrating icons into your design, you can unlock a world of communication possibilities. Here's how to harness the power of icons effectively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the realm of design, the right set of icons can transform your creations, adding depth, clarity, and personality to your user interfaces. Luckily, &lt;strong&gt;there's an abundant array of free icon packs available, each offering a treasure trove of visual elements that can take your design to new heights.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Choosing a single, high-quality icon pack and sticking to it throughout your project offers numerous benefits that contribute to a polished and cohesive design.&lt;/li&gt;
&lt;li&gt;When it comes to incorporating icons into your design, the choice of file format plays a significant role in ensuring optimal performance, scalability, and accessibility. &lt;strong&gt;SVG (Scalable Vector Graphics) and icon fonts offer distinct advantages over bitmap image formats like .jpg and .png.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Icons are not just visual elements; they are extensions of your design's personality and typography. By customizing their roundness, weight, and style, you can create a seamless integration that resonates with your overall design language.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;when to use icons : Use icons to provide visual assistance to text&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Icons can transform product feature blocks into visually engaging and informative sections, capturing users' attention and conveying key information at a glance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintaining Icon Neutrality:&lt;/strong&gt; Match the Color to Text. For Enhanced Focus: Opt for Contrasting Colors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preserve Icon Proportions:&lt;/strong&gt; Avoid Enlarging Beyond Design. Consider Placing Icons within Shapes When Resizing Required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important, useful, and powerful tools related to Icons:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Free Icons :&lt;/strong&gt; &lt;a href="https://phosphoricons.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Phosphor icons&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Icons, Photos, Illustrations, music :&lt;/strong&gt; &lt;a href="https://icons8.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Icons8&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Free Icons :&lt;/strong&gt; &lt;a href="https://ionic.io/ionicons" rel="noopener noreferrer"&gt;&lt;strong&gt;Ionicons&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And many more...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flz9403j3o10gi5yxoad3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flz9403j3o10gi5yxoad3.png" alt="Icons" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Magic of Shadows &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Shadows, often overlooked yet profoundly impactful, have the ability to transform two-dimensional designs into immersive and dynamic experiences. The artful use of shadows can add depth, contrast, and a touch of elegance, elevating your design to new heights. Here's a glimpse into the magic of shadows and how they can enhance your creations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating Depth: Shadows add a three-dimensional quality to your design, making elements appear as if they're floating above the surface. This depth creates visual interest and engages users.&lt;/li&gt;
&lt;li&gt;use shadows in small doses and resist the urge to apply them to every element.&lt;/li&gt;
&lt;li&gt;The key to a visually appealing and balanced composition lies in using shadows with a delicate touch. Here's a reminder: go light on shadows and refrain from making them overly dark.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When considering the application of shadows in your design, remember that their use should be purposeful and aligned with the personality of your website.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Less shadows : SERIOUS / ELEGANT, More Shadows : PLAYFUL / FUN&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;For smaller components that deserve prominence, consider harnessing the charm of small, subtle shadows.&lt;/li&gt;
&lt;li&gt;For larger areas that warrant heightened attention, consider embracing medium-sized shadows.&lt;/li&gt;
&lt;li&gt;When you seek to make elements truly appear to float above the interface, consider the impactful use of large shadows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1let0e1axrgs24j0kha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1let0e1axrgs24j0kha.png" alt="shadows" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76tcioog7kah501jaf11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76tcioog7kah501jaf11.png" alt="Shadow" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Curves of Elegance Mastering Border Radius &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Border radius, a subtle yet impactful design element, has the power to transform the look and feel of your website. By skillfully incorporating rounded corners, you can infuse your design with a touch of sophistication and visual appeal. Here's how to master the art of border radius and create a truly elegant user experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Softening Edges:&lt;/strong&gt; Border radius offers a graceful way to soften sharp edges, lending a friendly and approachable vibe to your design. Apply gentle rounding to buttons, images, and containers to create a more inviting atmosphere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Interest:&lt;/strong&gt; Experiment with varying degrees of curvature. Larger border radii can draw attention and add intrigue, while subtler curves contribute to a harmonious aesthetic.&lt;/li&gt;
&lt;li&gt;When it's time to infuse a touch of playfulness and break away from a serious tone, border radius becomes your creative ally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subtle Pop of Color:&lt;/strong&gt; Integrate border radius with color for added impact. Experiment with colored borders or background hues to amplify the visual effect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Button Hover Effects:&lt;/strong&gt; Add a slight increase in border radius on button hover to create a subtle, interactive effect that engages users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftaxkby6xzlo0inx0bnrr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftaxkby6xzlo0inx0bnrr.png" alt="border radius2" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6yy6qvp2cu0shb42k2wn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6yy6qvp2cu0shb42k2wn.png" alt="border radius" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Use White Space Wisely &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;White space, also known as negative space, is the unoccupied area between design elements. Contrary to its name, white space doesn't have to be white – it can be any color that separates and enhances your content. By utilizing white space thoughtfully, you can create a visually pleasing and impactful design. Here's how to make the most of it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Readability:&lt;/strong&gt; Ample white space around text and other elements improves legibility. It prevents visual clutter and makes it easier for users to focus on the content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Breathing Room:&lt;/strong&gt; White space provides room for your design elements to "breathe." It helps prevent overcrowding and ensures that each element has its own space to shine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focus and Emphasis:&lt;/strong&gt; White space draws attention to important elements. By surrounding key content with empty space, you guide users' eyes to what matters most.&lt;/li&gt;
&lt;li&gt;Incorporating ample white space &lt;strong&gt;between sections&lt;/strong&gt; is a design approach that enhances clarity, readability, and user engagement. By giving each section its own breathing space, you create a seamless and visually pleasing browsing experience.&lt;/li&gt;
&lt;li&gt;Integrating substantial white space &lt;strong&gt;between groups of elements&lt;/strong&gt; is a design strategy that fosters clarity, organization, and a refined user experience. By purposefully creating room around distinct groups of elements, you enhance visual coherence and guide users through your content with ease.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The principle of proximity in design states that elements that are related or belong together should be visually grouped by placing them in close proximity to one another. This fundamental design principle enhances organization, readability, and user understanding.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;When incorporating prominent elements like big text or large icons, allocating sufficient white space around them is essential.&lt;/li&gt;
&lt;li&gt;Small text and images, less space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adopting a consistent spacing guideline based on multiples of 16px can enhance your design's cohesiveness and efficiency.&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61l1hnh0z85uintqyzxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61l1hnh0z85uintqyzxe.png" alt="White space" width="636" height="300"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;let's combine all the key principles we've covered so far to create a well-rounded and effective design approach:&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Visual Hierarchy &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Visual hierarchy is a fundamental principle in design that guides users through content, emphasizing key elements and facilitating effortless comprehension. &lt;strong&gt;By manipulating factors like size, color, contrast, and spacing, you can create a clear path for users to follow.&lt;/strong&gt; Here's a breakdown of how visual hierarchy works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Size and Scale:&lt;/strong&gt; Larger elements naturally draw more attention. Use size to distinguish headings, subheadings, and important content from secondary details.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9xnd8yopldxhd0b0z2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9xnd8yopldxhd0b0z2i.png" alt="Size and scale" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Color and Contrast:&lt;/strong&gt; Vibrant colors and high contrast attract the eye. Utilize color to highlight focal points and guide users to critical information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyadue7jwt2d40dm8ood1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyadue7jwt2d40dm8ood1.png" alt="color and contrast" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Typography:&lt;/strong&gt; Vary font styles and weights to establish a hierarchy. Bold fonts for headers, regular fonts for body text, and italics for emphasis help organize content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spacing and Alignment:&lt;/strong&gt; Proper spacing separates elements and contributes to a clean layout. Consistent alignment helps maintain order and aids readability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Z-Pattern Reading:&lt;/strong&gt; Follow the natural reading pattern (left to right, top to bottom) to guide users through content. Place critical elements along this path.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Positioning:&lt;/strong&gt; Place vital content at the top, left, or center, where users' eyes naturally start. Important items should be above the fold or within a "golden triangle" for optimal visibility.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsop4ika0ln5n0s91wetw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsop4ika0ln5n0s91wetw.png" alt="Positioning" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual Elements:&lt;/strong&gt; Icons, illustrations, and graphics can convey meaning at a glance. Use these elements strategically to support your hierarchy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;White space:&lt;/strong&gt; Allow ample white space around important elements to give them breathing room and make them stand out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Flow:&lt;/strong&gt; Consider the user's journey and what you want them to see first, second, and so on. Align your hierarchy with the desired user flow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use images mindfully, as they draw a lot of attention (larger images get more attention).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;White space creates separation, so use white space strategically to emphasize elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For text elements, use font size, font weight, color, and white space to convey importance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What components should I emphasize? Testimonials, call-to-action sections, highlight sections, preview cards, forms, pricing tables, important rows and columns in tables, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Nurturing an Exceptional User Experience (UX) &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!🥳 I assume you have read all the above principles. Now we will see The Use cases and how to apply them according to different web personalities.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 7 web personalities we previously discussed : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Serious/Elegant:&lt;/strong&gt; Channeling luxury and refinement, this personality is characterized based on thin serif typefaces, golden or pastel colors, and big high-quality images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimalist/Simple:&lt;/strong&gt; Embracing simplicity, this personality centers around the essential text content, using small or medium-sized sans-serif black text, lines, and few images and icons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain/Neutral:&lt;/strong&gt; Design that gets out of the way by using neutral and small typefaces, and a very structured layout. Common in big corporations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bold/Confident:&lt;/strong&gt; Makes an impact, by featuring big and bold typography, paired with confident use of big and bright colored blocks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calm/Peaceful:&lt;/strong&gt; For products and services that care, transmitted by calming pastel colors, soft serif headings, and matching images/illustrations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Startup/Upbeat:&lt;/strong&gt; Widely used in startups, featuring medium-sized sans-serif typefaces, light-grey text and backgrounds, and rounded element.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Playful/Fun:&lt;/strong&gt; Colorful and round designs, fueled by creative elements like hand-drawn icons or illustrations, animations, and fun language.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Serious/Elegant :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Real estate, high fashion, Art and Collectibles, jewelry, luxury products or services. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Serif typefaces (especially in headings), light font weight to maintain an airy elegance, complemented by a small body font size that exudes subtlety and sophistication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Gold, pastel colors, black, Emerald Green, dark blue or grey.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Big, high-quality images are used to feature elegant and expensive products.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt; Icons are typically kept minimal within this style, yet thin icons and delicate lines can be subtly incorporated to enhance the design's sophistication and provide a touch of understated elegance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Usually no shadows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; no border-radius.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvhqqvqekcm4nyt1kv47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvhqqvqekcm4nyt1kv47.png" alt="evalendel" width="800" height="363"&gt;&lt;/a&gt;&lt;br&gt;
Visit : &lt;a href="https://evalendel.com/" rel="noopener noreferrer"&gt;evalendel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimalist/Simple :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Fashion, portfolios, Lifestyle Blogs, Coffee Shops/Cafés, minimalism companies, software startups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Boxy/squared sans-serif typefaces, small body font sizes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Usually black or dark grey, on pure white background. Usually just one color throughout the design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Few images, which can be used to add some color to the 
design. Usually no illustrations, but if, than just black.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt; Usually no icons, but small simple black icons may be used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Usually no shadows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; no border-radius.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwybgsyjkgn8kyl2myafk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwybgsyjkgn8kyl2myafk.png" alt="daniel website" width="800" height="367"&gt;&lt;/a&gt;&lt;br&gt;
Visit: &lt;a href="https://www.danielespiritosanto.com/" rel="noopener noreferrer"&gt;Daniel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plain/Neutral :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Well-established corporations, Financial Institutions, companies that don’t want to make an impact through design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Neutral-looking sans-serif typefaces are used, and text is usually small and doesn’t have visual impact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Safe colors are employed, nothing too bright or to washed-out. Blues and blacks are common.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Images are frequently used, but usually in a small format.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt; Usually no icons, but small simple black icons may be used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Usually no shadows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; no border-radius.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1x13v4tzc67orofsdw9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1x13v4tzc67orofsdw9.png" alt="facebook" width="800" height="364"&gt;&lt;/a&gt;&lt;br&gt;
Visit: &lt;a href="https://www.facebook.com/" rel="noopener noreferrer"&gt;facebook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bold/Confident :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Digital agencies, software startups, travel, “strong" companies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Boxy/squared sans-serif typefaces, big and bold typography, especially headings. Uppercase headings are common.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Usually multiple bright colors. Big color blocks/sections are used to draw attention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Lots of big images are usually displayed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt; Usually no icons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Usually no shadows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; no border-radius.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkikwwbnv1j872c17pa1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkikwwbnv1j872c17pa1v.png" alt="rankz" width="800" height="367"&gt;&lt;/a&gt;&lt;br&gt;
Visit: &lt;a href="https://rankz.co/" rel="noopener noreferrer"&gt;ranks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Calm/Peaceful :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Healthcare, all products with focus on consumer well-being.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Soft serif typefaces frequently used for headings, but sans-serif headings might be used too (e.g for software products).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Pastel/washed-out colors: light oranges, yellows, browns, greens, blue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Images and illustrations are usual, matching calm color palette.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt;  Icons are quite frequent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Usually no shadows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; Some border-radius is usual.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg9y4551wv2ve42q07mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg9y4551wv2ve42q07mt.png" alt="health" width="800" height="367"&gt;&lt;/a&gt;&lt;br&gt;
Visit : &lt;a href="https://www.drugs.com/" rel="noopener noreferrer"&gt;Drugs.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Startup/Upbeat :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Software startups, and other modern-looking companies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Medium-sized headings (not too large), usually one sans-serif typeface in whole design. Tendency for lighter text colors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Blues, greens and purples are widely used. Lots of light backgrounds (mainly gray), gradients are also common.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Images or illustrations are always used. 3D illustrations are modern. Sometimes patterns and shapes add visual details.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt;  Icons are very frequent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Subtle shadows are frequent. Glows are becoming modern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; Border-radius is very common.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuvt0tlhzmzwlx3mt0i7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuvt0tlhzmzwlx3mt0i7.png" alt="Groww" width="800" height="367"&gt;&lt;/a&gt;&lt;br&gt;
Visit : &lt;a href="https://groww.in/" rel="noopener noreferrer"&gt;Groww&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Playful/Fun :&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Industries:&lt;/strong&gt; Child products, animal products, food.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typography:&lt;/strong&gt; Round and creative (e.g. handwritten) sans-serif typefaces are frequent. Centered text is more common.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Colors:&lt;/strong&gt; Multiple colors are frequently used to design a colorful layout, all over backgrounds and text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Images, hand-drawn (or 3D) illustrations, and geometric shapes and patterns are all very frequently used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Icons:&lt;/strong&gt;   Icons are very frequent, many times in a hand-drawn style.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows:&lt;/strong&gt; Subtle shadows are quite common, but not always used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Border-radius:&lt;/strong&gt; Border-radius is very common.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqkq51eqerv3xcs3bwvwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqkq51eqerv3xcs3bwvwh.png" alt="babymoo" width="800" height="366"&gt;&lt;/a&gt;&lt;br&gt;
Visit: &lt;a href="https://babymoo.in/" rel="noopener noreferrer"&gt;Babymoo&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Congratulations!👏 You've reached the end. I hope you've gained valuable knowledge. Remember to keep practicing and innovating. Keep up the great work!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/mohiyaddeen-raza" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; 🚀&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✨May your journey through learning be as endless as the possibilities it unveils. Keep your curiosity alive, your passion burning, and your creativity flowing. As you embrace each challenge, remember that every step forward is a step toward new horizons. Keep exploring, keep growing, and let your innovative spirit shine brightly in all you do. The world awaits your unique contributions. Keep learning, keep soaring, and never stop believing in the magic of your own potential.✨&lt;/p&gt;

&lt;p&gt;See you next time for more amazing guides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding✌🏻&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Please Like, Share and Follow 🙏.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feel free to ask any questions in the comments section—I'll respond promptly and thoroughly to your inquiries. Your doubts are warmly welcomed and will receive swift and comprehensive replies. ❤️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check out my DEV post on CSS Layouts: &lt;a href="https://dev.to/mohiyaddeen7/mastering-layout-in-css-a-comprehensive-guide-for-developers-31om"&gt;https://dev.to/mohiyaddeen7/mastering-layout-in-css-a-comprehensive-guide-for-developers-31om&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>design</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Tansforms, Transitions and Animations : Elevating User Experiences with CSS Transitions and Animations🚀</title>
      <dc:creator>mohiyaddeen7</dc:creator>
      <pubDate>Sun, 06 Aug 2023 17:04:59 +0000</pubDate>
      <link>https://dev.to/mohiyaddeen7/tansforms-transitions-and-animations-elevating-user-experiences-with-css-transitions-and-animations-364j</link>
      <guid>https://dev.to/mohiyaddeen7/tansforms-transitions-and-animations-elevating-user-experiences-with-css-transitions-and-animations-364j</guid>
      <description>&lt;p&gt;In the ever-evolving landscape of web development, creating captivating user experiences is a paramount goal. Cascading Style Sheets (CSS) offer a range of tools to enhance interactions and engage users. In this article, we'll dive into the realm of CSS Transforms, Transitions, and Animations, uncovering their potential to transform static designs into dynamic and immersive web experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's get started🚀&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Tranforms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transitions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Animations&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Transforms &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It is a CSS property that is used to rotate, scale, move, skew, etc. elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2D Methods That are used With the transform property are :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;translate&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rotate&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scale&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;skew&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;matrix&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;translate(x,y) :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This property is used to move an element along the X and/or Y axes within its containing element without affecting the normal flow of the document or the layout of surrounding elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: translate(30px,100px);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE : translate(x,y): the first value should be offset from the x-axis, and the second value should be offset from the y-axis.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/dyQrEEx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen we have created a box with a height of 10vh (&lt;a href="https://www.w3schools.com/cssref/css_units.php" rel="noopener noreferrer"&gt;viewport height&lt;/a&gt;) and a width of 10vw (&lt;a href="https://www.w3schools.com/cssref/css_units.php" rel="noopener noreferrer"&gt;viewport width&lt;/a&gt;). Using the &lt;strong&gt;translate property&lt;/strong&gt;, we have moved the box 30 px from the x-axis (offset from left) and 100 px from the y-axis (offset from top).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single-value Syntax for translate :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: translateX(30px);
}

/*OR*/

.box1{
  tansform: translateY(100px);
}

/*OR*/

.box1{
  tansform: translateX(30px) translateY(100px); /*This will work same as translate(30px,100px) */
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on translate property visit :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rotate :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The CSS rotate property is used to rotate an element (such as an image, text, or a container) around a specified point or axis. It allows you to change the visual orientation of an element, giving it a rotated appearance.&lt;/p&gt;

&lt;p&gt;The rotation is specified in degrees, and positive values rotate the element in a clockwise direction, while negative values rotate it in a counterclockwise direction. The default rotation point is the center of the element, but you can also specify a different point using the "transform-origin" property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;transform-origin property :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The CSS transform-origin property determines the point around which an element is rotated, scaled, or transformed in other ways using the transform property. &lt;strong&gt;It allows you to control the pivot point or axis of the transformation, influencing how the element visually changes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The property takes values that specify the horizontal and vertical offsets from the element's top-left corner, &lt;strong&gt;or you can use keywords like center, top, bottom, left, and right to define the origin relative to the element's edges.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE : The transform-origin property must be used with the transform property.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax for rotate :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: rotate(45deg);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Syntax for tranform-origin :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  transform-origin: top right; 
  tansform: rotate(45deg);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/VwVRJjL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have rotated the box 45 degrees from the center origin (which is by default) using the rotate property.&lt;/p&gt;

&lt;p&gt;Now let us try rotating the box by different origins using the transform-origin property.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/ZEmPdpq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;You can adjust the transform-origin values to control the pivot point and achieve the desired transformation effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE : | transform-origin: x y | The first value should be offset from the x-axis, and the second value should be offset from the y-axis.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on rotate property visit :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on transform-origin property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;scale :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This property is used to change the size of an element, making it appear larger or smaller while maintaining its proportions.&lt;/p&gt;

&lt;p&gt;The "scale" property takes one or two values, representing the scaling factor along the horizontal and vertical axes. A single value scales both axes equally, while two values allow you to scale them independently. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values less than 1 decrease the size (shrink), and values greater than 1 increase the size (enlarge).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: scale(2,0.5);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/ExOMBQq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise : Try placing (hovering) your cursor on the arrow image in the above codepen.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See how it changed its size. This was achieved using the "scale" property and the "hover" property.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single-value Syntax for scale :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: scaleX(2);
}

/*OR*/

.box1{
  tansform: scaleY(0.5);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on scale property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;skew :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This property is used to distort the shape of an element by tilting it along the horizontal and/or vertical axes.&lt;/p&gt;

&lt;p&gt;The skew property takes one or two angles as values, representing the amount of skewing along the x-axis (horizontal) and y-axis (vertical). Positive angles tilt the element in a certain direction, while negative angles tilt it in the opposite direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: skew(45deg, 20deg);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/QWJoXBB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have skewed "box 2" along the x-axis by 45 degrees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on skew property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;matrix :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This property takes 6 parameters. With the help of these parameters, we can rotate, scale, move (translate), and skew elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY())&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  tansform: matrix(2, 45deg, 12deg, 0.5, 10px, 150px);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on matrix property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3D Methods That are used With Transform property are :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;translate3d&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rotate3d&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;perspective&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the translate and rotate properties for the z-axis are set, the perspective property must also be set on the parent element before we can see any effect.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;perspective property&lt;/strong&gt; determines the distance between the object and the viewer. A smaller value creates a stronger 3D effect, making the object appear closer and more pronounced, while a larger value reduces the perceived 3D effect, making the object seem farther away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When setting the perspective property for an element, it is the CHILD elements that acquire the perspective view rather than the element itself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  perspective:100px;
}
.box1{
  tansform: translateZ(10px) rotateZ(45deg);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/bGQZXGx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on perspective property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/perspective" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/perspective&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on transform property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transform" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transform&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Now the interesting part starts 😎&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Transitions &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The CSS transition property is used to create smooth and animated changes in an element's style over a specified duration when a property is modified. It allows you to control the speed and ease of the transition between the element's initial and final states.&lt;/p&gt;

&lt;p&gt;The transition property is a powerful tool for creating smoother user experiences and adding visual polish to web interactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transition properties are :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;transition-property :&lt;/strong&gt;  name of the property that is to be transitioned&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;transition-duration :&lt;/strong&gt; duration of the overall transition
3.&lt;strong&gt;transition-timing-function :&lt;/strong&gt; This is used to define the acceleration and deceleration patterns of a transition animation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;transition-delay :&lt;/strong&gt; delay in transition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  background-color: blue;
}

.box1:hover{
  background-color: blue;
  transition-property: background-color;
  transition-duration: 3s;
  transition-timing-function: ease-in;
  transition-delay: 1s;  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/ExOMqvg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Try changing the transition-duration property in the above codepen&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Try clearing all the transitions from the box1 element and just running the code with only the hover effect. You will see the changes, but they will not be as smooth when transition is used. so we can achieve smoothness in transitions with transition properties.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;IMPORTANT NOTE&lt;/u&gt;&lt;/strong&gt; : &lt;strong&gt;Instead of using all the above properties individually, we can use them all in one property, i.e., a shorthand property for the transition property.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;tp&lt;/strong&gt;  - &lt;strong&gt;transition-property&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;td&lt;/strong&gt;  - &lt;strong&gt;transition-duration&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;ttf&lt;/strong&gt; - &lt;strong&gt;transition-timing-function&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;tdy&lt;/strong&gt; - &lt;strong&gt;transition-delay&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt; &lt;br&gt;
transition : tp td ttf tdy;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example for shorthand property of transition property :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  background-color:black;
}

.box1:hover{
  background-color:orange;
  transition : background-color 2s ease-in 1s;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on transition property visit:&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/transition" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/transition&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;transition triggers :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Transition triggers in CSS determine when a transition effect should occur on an element. These triggers are events that initiate the transition from one style state to another, creating smooth and visually appealing animations. Common transition triggers include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;:hover&lt;/strong&gt; -&amp;gt; The transition is triggered when the user hovers the cursor over the element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;:focus&lt;/strong&gt; -&amp;gt; The transition occurs when the element receives focus.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;:focus-within&lt;/strong&gt; -&amp;gt; The transition occurs when the element or any descendant of it receives focus.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;:target&lt;/strong&gt; -&amp;gt; Applies when the ID of the element matches the fragment of the current URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;class ADD/Remove&lt;/strong&gt; -&amp;gt; Adding or removing a specific class from the element triggers the transition. This is often used in combination with JavaScript for dynamic animations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on transition triggers visit:&lt;/strong&gt;&lt;a href="https://web.dev/learn/css/transitions/#transition-triggers" rel="noopener noreferrer"&gt;https://web.dev/learn/css/transitions/#transition-triggers&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Animations &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;CSS animations allow you to create dynamic and visually engaging effects on web elements. They enable smooth and controlled transitions between different styles or states, enhancing the user experience. &lt;/p&gt;

&lt;p&gt;To create a CSS animation, you define the animation using the &lt;strong&gt;@keyframes rule&lt;/strong&gt;, which specifies the intermediate steps (keyframes) of the animation. Then, you apply the animation to an element using the &lt;strong&gt;animation property&lt;/strong&gt;, specifying the animation's name, duration, timing function, and other optional settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Why use animations when we could do the same thing with transitions?&lt;/u&gt;&lt;br&gt;
-&amp;gt; Because while using transition, we can only travel from the start state to the end state. But when we use animations, we can define as many states as we need and change the styles of elements precisely for every state.&lt;br&gt;
And another main difference between these two properties is that for transition properties, a transition trigger is required, but for animations, they don't require any trigger. and also that animations can loop while transitions can't.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;animation properties :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;animation-name :&lt;/strong&gt;  name of the animation (custom name)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-duration :&lt;/strong&gt; duration of the overall animation
3.&lt;strong&gt;animation-timing-function :&lt;/strong&gt; This is used to define the acceleration and deceleration patterns of a animation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-delay :&lt;/strong&gt; delay in animation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-iteration-count :&lt;/strong&gt; number of times the animation should run&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-direction :&lt;/strong&gt; defines the direction of the animation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;values for animation properties :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;animation-name :&lt;/strong&gt; custom name (can be anything you like)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-duration :&lt;/strong&gt; s (second) or ms (milliseconds).
3.&lt;strong&gt;animation-timing-function :&lt;/strong&gt; ease-in, ease-out, ease-in-out, linear(default), etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-delay :&lt;/strong&gt; s (second) or ms (milliseconds).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-iteration-count :&lt;/strong&gt; infinite, number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animation-direction :&lt;/strong&gt; reverse, alternate, alternate-reverse.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Syntax for animation :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  background-color:black;
  animation-name: animatebox1;
  animation-duration: 3s;
  animation-timing-function: ease-in;
  animation-delay: 1s;
  animation-iteration-count: infinite; 
}


@keyframes animatebox1{
  from{
    background-color:black;
  }
  to{
    background-color:orange;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/eYQoOmv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have created a progress bar using the "animation" property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shorthand for animation property :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;an&lt;/strong&gt;  - &lt;strong&gt;animation-name&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;ad&lt;/strong&gt;  - &lt;strong&gt;animation-duration&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;atf&lt;/strong&gt; - &lt;strong&gt;animation-timing-function&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;ad&lt;/strong&gt;  - &lt;strong&gt;animation-delay&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;aic&lt;/strong&gt; - &lt;strong&gt;animation-iteration-count&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;adc&lt;/strong&gt; - &lt;strong&gt;animation-direction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;animation : an ad atf ad aic adc;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using percentage values to define states in animation :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using percentage values to define states in CSS animations is a powerful technique that allows you to precisely control an element's appearance and behavior at different points during the animation's progression. By specifying keyframes using percentages, you can create smooth and intricate animations that smoothly transition between various states.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes animatebox1{
  0%{
    background-color:black;
  }
  20%{
    background-color:green;
  }
  60%{
    background-color:orange;
  }
  80%{
    background-color:blue;
  }
  100%{
    background-color:yellow;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Percentage-based keyframes give you fine-grained control over an animation's behavior at specific moments. You can define intermediate states, control properties like opacity and color, and create intricate effects that smoothly transition between different styles.&lt;/p&gt;

&lt;p&gt;By utilizing percentage values in your keyframes, you can craft visually appealing animations that enhance your web design and user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on animation property visit:&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animations/Using_CSS_animations" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animations/Using_CSS_animations&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/mohiyaddeen-raza" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;✨Embrace the canvas of code and the palette of design. As web developers and designers, we weave innovation and creativity into pixels and pixels into experiences. Together, we craft the digital world, where every line of code and stroke of design is a brushstroke on the canvas of possibility. Let's paint a masterpiece of the web, one pixel at a time.🎨💻🌐✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See you next time for more amazing guides. Until then, stay tuned.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding✌🏻&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please don't hesitate to ask doubts in the comments section—I'll be sure to respond promptly. Your inquiries are greatly welcomed and will receive a swift and thorough reply.❤️&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>frontend</category>
      <category>design</category>
    </item>
    <item>
      <title>CSS Layouts : A comprehensive guide for developers 🔥</title>
      <dc:creator>mohiyaddeen7</dc:creator>
      <pubDate>Fri, 04 Aug 2023 14:26:30 +0000</pubDate>
      <link>https://dev.to/mohiyaddeen7/mastering-layout-in-css-a-comprehensive-guide-for-developers-31om</link>
      <guid>https://dev.to/mohiyaddeen7/mastering-layout-in-css-a-comprehensive-guide-for-developers-31om</guid>
      <description>&lt;p&gt;Creating a visually appealing and responsive website layout is a cornerstone of web development. With the ever-growing range of devices and screen sizes, mastering CSS layout techniques is crucial for delivering a seamless user experience. In this article, we will delve into the key concepts and best practices for creating robust and flexible layouts using CSS.&lt;/p&gt;

&lt;p&gt;Let's get started🚀&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;3 ways of building layouts with CSS&lt;/strong&gt;, and they are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Float Layouts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexbox&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CSS Grid&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Float Layouts &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i6ovjxietocx8h677d2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i6ovjxietocx8h677d2.png" alt="Illustration showing how float property works" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Layouts using the float property in CSS involve positioning elements horizontally within a container. It can contain values left or right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  height:30vh;
  width:30vw;
  background-color:red;
  float:right;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/GRwzaRV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have created 2 boxes and floated box1 to the right, and by doing this, it also allows other elements to float to the left side of it. This is because floated elements are taken out of the normal document flow, and the content that follows will wrap around the floated element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more info on float property visit :&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/float" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/float&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to prevent this wrapping behavior and ensure that certain elements do not float beside the floated element, you can use the &lt;strong&gt;"clear"&lt;/strong&gt; property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.box1{
  height:30vh;
  width:30vw;
  background-color:red;
  float:right;
}
.box2{
  clear:right;
  height:30vh;
  width:30vw;
  background-color:red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/PoxVvKZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have applied the "clear" property to box 2, and by doing this, we have achieved a box on whose right side no elements can be floated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more info on clear property visit :&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/clear" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/clear&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE : Initially intended for simple text wrapping around images, float gained popularity as a layout tool. However, its behavior can be challenging to control, leading to unexpected results in complex layouts. It has limitations in creating modern, responsive, and complex layouts.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Flexbox &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uqvk4u255ragtpb17z1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uqvk4u255ragtpb17z1.png" alt="Illustration of flexbox" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Flexbox, we can easily create complex arrangements of elements in a single direction (either horizontally or vertically). &lt;strong&gt;By defining a parent container as a flex container, you gain precise control over the alignment, distribution, and spacing of child elements.&lt;/strong&gt; This approach eliminates the need for float-based layouts and intricate positioning, making it an essential tool for crafting component layouts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.flex-container{
  display:flex;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Flex properties for parent (flex container) are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;flex-direction&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;flex-wrap&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;justify-content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;align-items&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;align-content&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;flex-direction :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;br&gt;
It is used to define the direction in which the items are laid out. The values for this property can be row, row-reverse, column, or column-reverse. By default, the value for flex-direction is "row".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:flex;
  flex-direction:column;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/LYXaRKB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on flex-direction property visit :&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;flex-wrap :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The flex-wrap property defines whether the flex items should wrap or not. The values for this property can be wrap, no-wrap, or wrap-reverse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:flex;
  flex-wrap:wrap;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/xhw4d6"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise : For the above codebox, try changing the orientation by sliding from left to right.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more info on flex-direction property visit :&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;justify-content :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to define flex items along the &lt;strong&gt;main axis.&lt;/strong&gt; The values for this property can be flex-start, flex-end, center, space-between, space-around, and space-evenly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:flex;
  justify-content:center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/mdQoOPZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen we have created a simple NAVBAR using flex and justify-content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flexwx8747vov3zgr5u6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flexwx8747vov3zgr5u6s.png" alt="Illustration of justify-content property" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on justify-content property visit :&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-items :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to define flex items along the &lt;strong&gt;cross axis.&lt;/strong&gt; The values for this property can be flex-start, flex-end, center, stretch, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:flex;
  align-items:center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/XWyGNGy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen we have centered the flex-items along the cross axis using the align-items property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on align-items property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-items" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/align-items&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-content :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to align the flex container's lines when there is extra space on the cross axis. The values for this property can be flex-start, flex-end, center, stretch, space-between, space-around, and space-evenly.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Syntax : *&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:flex;
  align-content:center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/wvQOoLd?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen try clearing the align-content property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on align-content property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-content" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/align-content&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flex properties for flex items (children) are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;order&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;align-self&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;flex-grow&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;flex-shrink&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;order :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to specify the order of flex items. By default, the order of all flex items is 0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example :&lt;/strong&gt; If there are 3 flex items in a flex container and we apply the order property to only 1 item, it will float to the end as the other two items have order 0, therefore the other item whose order is 1 will float to the end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item1{
  order: 2;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/vYQPxXR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on order property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/order" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/order&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-self :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to align individual flex items along a cross axis. The values for this property can be flex-start, flex-end, center, stretch, and auto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item1{
  align-self: flex-start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/YzRgZNe?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on align-self property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-self" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/align-self&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;flex-grow :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to define the ability of an individual flex item to grow relative to other flex items. By default, the flex-grow property value for all the flex items is 0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item1{
  flex-grow: 1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/abQMJWJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on flex-grow property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;flex-shrink :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to define the ability to shrink an individual flex item relative to other flex items. By default, the flex-grow property value for all the flex items is 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item1{
  flex-shrink: 3;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on flex property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on flex property visit :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/flex&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  CSS Grid &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx3cdynuqhzkq79aro7p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx3cdynuqhzkq79aro7p.png" alt="Illustration of CSS grid" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach offers precise control over the placement and alignment of content, making it ideal for designing intrinsic page layouts and complex components. We can achieve versatile and dynamic layouts that adapt seamlessly to various screen sizes and orientations. CSS Grid's intuitive syntax and robust capabilities make it an essential tool for modern web development, enabling developers to craft visually appealing and structured designs efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/eYQXgWX?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen we have created a CSS grid with 1 column and 8 rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid properties for parent (grid container) are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;grid-template-columns&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;grid-template-rows&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;justify-content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;align-content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;grid-template-areas&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;grid-template-columns :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to specify the number and width of columns in a grid layout. The values for this property can be auto, length, max-content, min-content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-columns: auto auto auto; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/yLQwgpZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen we have created a CSS grid with 3 columns and 3 rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on grid-template-columns property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-template-rows :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to specify the height of rows in a grid layout. The values for this property can be auto, length, max-content, min-content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows: 20px 100px 50px; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on grid-template-rows property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;justify-content :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to horizontally align the whole grid inside the container. The values for this property can be center, space-between, space-around, space-evenly, start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE : illustrations for this property are shown above in this post while discussing Flexbox. Please refer to it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;align-content :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to vertically align the whole grid inside the container. The values for this property can be center, space-between, space-around, space-evenly, start, end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE : illustrations for this property are shown above in this post while discussing Flexbox. Please refer to it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-template-areas :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used together with the CSS "grid-area" property to establish the areas within the grid layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-areas: "box1 box2"
                       "box1 box2"; 
}

.box1{
  grid-area: box1; 
}

.box2{
  grid-area: box2; 
}

.box3{
  grid-area: box3; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For more information on grid-template-areas property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS media queries :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is used to apply CSS when a certain condition is true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media screen and (max-width:360px) {
    body{
        background-color: blue;
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/jyjkqt"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exercise : For the above codebox, try changing the orientation by sliding from left to right. If you see changes in page layout, they are achieved using the "grid-template-areas" property and media queries. When width is reduced to 360 px, we have changed the value of "grid-template-areas" to another value.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on CSS media queries visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid properties for grid items (children) are:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;grid-column&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;grid-row&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;grid-area&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;grid-column :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;br&gt;
It is used to define where the grid items start and end in the &lt;strong&gt;direction of the columns.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-item1 {
  grid-column: 1 / span 2;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/eYQXvmN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have created a grid with 4 columns. and we have spanned item 1 from column-1 to column-2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on grid-column property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;grid-row :&lt;/strong&gt; &lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is used to define where the grid items start and end in the &lt;strong&gt;direction of the rows.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-item1 {
  grid-row: 1 / span 2;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Mohiyaddeen-raza/embed/LYXaWpy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above codepen, we have created a grid with 4 columns. and we have spanned item 1 from row-1 to row-2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on grid-row property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For more information on grid property visit :&lt;/strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's connect on [LinkedIn]&lt;/strong&gt;(&lt;a href="https://www.linkedin.com/in/mohiyaddeen-raza" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/mohiyaddeen-raza&lt;/a&gt;) 🚀&lt;/p&gt;

&lt;p&gt;✨Embrace the art of layout design in CSS and let your creativity flow through grids, flexboxes, and responsive wonders. Remember, every pixel you place is a stroke of innovation, shaping the digital experiences of tomorrow. As you embark on your journey to master layouts, don't hesitate to ask questions, share insights, and collaborate with fellow developers. The world of web design is constantly evolving, and by honing your layout skills, you're sculpting the future of the web, one line of code at a time. Keep pushing boundaries, keep learning, and keep crafting exceptional user experiences.✨&lt;/p&gt;

&lt;p&gt;See you next time for more amazing guides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding✌🏻&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please don't hesitate to ask doubts in the comments section—I'll be sure to respond promptly. Your inquiries are greatly welcomed and will receive a swift and thorough reply.&lt;/strong&gt;❤️&lt;/p&gt;

</description>
      <category>css</category>
      <category>layouts</category>
      <category>tutorial</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
