Hello, friends! I hope you’re having an amazing day. Today, I’m here to guide you through creating an easy and effective multiple-typing text animation using HTML, CSS, and JavaScript. This effect not only looks attractive but also is a fantastic way to engage your visitors and make your website stand out.

What Is Multiple Typing Text Animation?

Multiple typing text animation is the dynamic and engaging effect where text changes automatically, just like a classic typewriter. This animation has become a popular trend in web design, giving websites a modern and interactive feel. Whether you’re creating a portfolio, a personal blog, or a business site, incorporating this effect can enhance user experience and keep visitors on your page longer.

Why Use Typing Text Animation?

  1. Engagement: Animated text captures attention and encourages visitors to read your content.
  2. Modern Aesthetic: It adds a contemporary touch to your website design, making it feel fresh and up-to-date.
  3. Versatility: This animation can be used in various contexts, from showcasing skills to highlighting services.

How Multiple Typing Text Animation Works

In this project, we’ll create a simple yet effective animation with two types of text: a static part and a dynamic part that changes over time. The static text remains constant, while the dynamic text will cycle through different phrases like a typewriter.

To achieve this effect, we’ll utilize CSS for styling and animation, alongside JavaScript to control the text changes. Below, I’ll provide the complete source code to help you get started.

Source Code for Multiple Typing Text Animation

To implement this animation on your website, you’ll need to create two files: one for HTML and one for CSS. Simply copy and paste the code provided below into your respective files.

HTML Code

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
</head>
<body>
      <div class="container">
          <span class="text first-text">I'm a</span>
          <span class="text sec-text">Designer</span>
      </div>
<script>
      const text = document.querySelector(".sec-text");

      const textLoad = () => {
      setTimeout(() => {
      text.textContent = "Designer";
      }, 0);
      setTimeout(() => {
      text.textContent = "Blogger";
      }, 4000);
      setTimeout(() => {
      text.textContent = "YouTuber";
      }, 8000);
      }

      textLoad();
      setInterval(textLoad, 12000);
</script>
</body>
</html>

CSS Code

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;

    align-items: center;
    justify-content: center;
    background: #010718;
    overflow: hidden;
}

.container {
    width: 246px;
    overflow: hidden;
}

.container .text {
    position: relative;
    color: #4070F4;
    font-size: 30px;
    font-weight: 600;
}

.container .text.first-text {
    color: #FFF;
}

.text.sec-text:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #010718;
    border-left: 2px solid #4070F4;
    animation: animate 4s steps(12) infinite;
}

@keyframes animate {
    40%, 60% {
        left: calc(100% + 4px);
    }
    100% {
        left: 0%;
    }
}

Download the Source Code

Ready to bring this multiple-typing text animation to your website? You can easily download the complete source code by clicking the button below. This zip file includes both the HTML and CSS files, so you can get started right away!

Simply extract the files and customize the text and styles to fit your unique vision. Enjoy creating an engaging and interactive experience for your visitors!

Sliders are a fantastic way to present content on websites, especially if you’re aiming for a clean and interactive design. Whether you’re showcasing products, portfolios, or images, a responsive card slider can really enhance your website’s user experience.

In this guide, I’ll show you how to create a responsive card slider using HTML, CSS, and JavaScript, and to make it even more appealing, we’ll incorporate the glassmorphism effect. Using SwiperJS, a popular JavaScript library for sliders, we can make the slider touch-friendly and fully responsive for both mobile and desktop.

By the end of this tutorial, you’ll have a fully functional and responsive image slider that you can add to your own website.

Why Use SwiperJS for a Responsive Slider?

SwiperJS is one of the best libraries available for creating interactive and mobile-friendly sliders. It’s easy to set up, highly customizable, and supports modern features like touch gestures, lazy loading, and autoplay.

If you prefer to understand the mechanics behind building sliders from scratch, you can also try creating a slider using vanilla JavaScript. It will help deepen your JavaScript skills, giving you full control over the slider’s behavior.

Now, let’s dive into building our responsive card slider!

Step-by-Step Guide to Creating a Responsive Card Slider with HTML, CSS & JavaScript

Step-by-Step Guide to Creating a Responsive Card Slider with HTML, CSS & JavaScript

1. Set Up Your Project Folder
To begin, create a folder for your project. You can name it something like card-slider. Inside the folder, create the following essential files:

  • index.html for the HTML markup
  • style.css for the CSS styles
  • script.js for the JavaScript code

2. Prepare the Images
For the slider, you’ll need images. Place your images in a folder within the project directory called images. You can use any set of images you like, but it’s important to optimize them for faster loading on both mobile and desktop.

3. Write the HTML Code
In your index.html file, you’ll set up the structure of your card slider. Be sure to include the SwiperJS CDN links to enable all the functionality that the library offers.

<!DOCTYPE html>
<!-- Coding By Abhikesh - www.abhikesh.com -->
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Card Slider HTML and CSS | Abhikesh</title>
  <!-- Linking SwiperJS CSS -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="container swiper">
    <div class="slider-wrapper">
      <div class="card-list swiper-wrapper">
        <div class="card-item swiper-slide">
          <img src="images/img-1.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">James Wilson</h2>
          <p class="user-profession">Software Developer</p>
          <button class="message-button">Send</button>
        </div>
        <div class="card-item swiper-slide">
          <img src="images/img-2.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">Sarah Johnson</h2>
          <p class="user-profession">Graphic Designer</p>
          <button class="message-button">Send</button>
        </div>
        <div class="card-item swiper-slide">
          <img src="images/img-3.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">Michael Brown</h2>
          <p class="user-profession">Project Manager</p>
          <button class="message-button">Send</button>
        </div>
        <div class="card-item swiper-slide">
          <img src="images/img-4.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">Emily Davis</h2>
          <p class="user-profession">Marketing Specialist</p>
          <button class="message-button">Send</button>
        </div>
        <div class="card-item swiper-slide">
          <img src="images/img-5.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">Christopher Garcia</h2>
          <p class="user-profession">Data Scientist</p>
          <button class="message-button">Send</button>
        </div>
        <div class="card-item swiper-slide">
          <img src="images/img-6.jpg" alt="User Image" class="user-image">
          <h2 class="user-name">Richard Wilson</h2>
          <p class="user-profession">Product Designer</p>
          <button class="message-button">Send</button>
        </div>
      </div>
      <div class="swiper-pagination"></div>
      <div class="swiper-slide-button swiper-button-prev"></div>
      <div class="swiper-slide-button swiper-button-next"></div>
    </div>
  </div>
  <!-- Linking SwiperJS script -->
  <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
  <!-- Linking custom script -->
  <script src="script.js"></script>
</body>
</html>
4. Style the Slider with CSS
In style.css, you’ll define how your slider looks. We’re using a modern glassmorphism effect, which will give your slider a frosted glass-like appearance. Feel free to play with different color schemes, shadows, and backgrounds to personalize the look.
/* Importing Google Font - Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: url("images/bg.jpg") #030728 no-repeat center;
}
.slider-wrapper {
  overflow: hidden;
  max-width: 1200px;
  margin: 0 70px 55px;
}
.card-list .card-item {
  height: auto;
  color: #fff;
  user-select: none;
  padding: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  backdrop-filter: blur(30px);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.card-list .card-item .user-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 40px;
  border: 3px solid #fff;
  padding: 4px;
}
.card-list .card-item .user-profession {
  font-size: 1.15rem;
  color: #e3e3e3;
  font-weight: 500;
  margin: 14px 0 40px;
}
.card-list .card-item .message-button {
  font-size: 1.25rem;
  padding: 10px 35px;
  color: #030728;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  border: 1px solid transparent;
  transition: 0.2s ease;
}
.card-list .card-item .message-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #fff;
  color: #fff;
}
.slider-wrapper .swiper-pagination-bullet {
  background: #fff;
  height: 13px;
  width: 13px;
  opacity: 0.5;
}
.slider-wrapper .swiper-pagination-bullet-active {
  opacity: 1;
}
.slider-wrapper .swiper-slide-button {
  color: #fff;
  margin-top: -55px;
  transition: 0.2s ease;
}
.slider-wrapper .swiper-slide-button:hover {
  color: #4658ff;
}
@media (max-width: 768px) {
  .slider-wrapper {
    margin: 0 10px 40px;
  }
  .slider-wrapper .swiper-slide-button {
    display: none;
  }
}
5. Add JavaScript for Functionality
In script.js, you’ll initialize SwiperJS and add the interactivity. This is where you can configure various features like autoplay, pagination, and touch gestures to make the slider functional across devices.
const swiper = new Swiper('.slider-wrapper', {
    loop: true,
    grabCursor: true,
    spaceBetween: 30,
    // Pagination bullets
    pagination: {
      el: '.swiper-pagination',
      clickable: true,
      dynamicBullets: true
    },
    // Navigation arrows
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
    // Responsive breakpoints
    breakpoints: {
      0: {
        slidesPerView: 1
      },
      768: {
        slidesPerView: 2
      },
      1024: {
        slidesPerView: 3
      }
    }
  });

Conclusion: Building a Responsive Slider for Modern Websites
By following this tutorial, you’ve successfully created a responsive card slider using HTML, CSS, and JavaScript (SwiperJS). This slider not only enhances your website’s visual appeal but also improves the user experience, especially for mobile users.

Feel free to customize the slider by experimenting with different settings in SwiperJS, such as pagination, navigation, and transitions. For more advanced customization, refer to the SwiperJS documentation to unlock its full potential and personalize your slider.

Additionally, if you prefer a ready-made version, you can download the project files by clicking the button below. This will allow you to explore the code in more detail or implement it directly into your own projects.

Understanding web design can be beneficial in today’s world. Create an effective homepage to showcase your portfolio, host a blog, or experiment with web design techniques.

This post is written for beginners and will help them create their website homepage using HTML/CSS. They’ll learn how to design an engaging homepage featuring an interactive navigation bar and where and how to style elements to make their website visually pleasing and captivating.

We will utilize HTML elements such as div, button, h2, h1 tags and CSS properties to build a responsive homepage for beginners. This project should go smoothly, so don’t expect any difficulty following along.

Create a Website Home Page with HTML and CSS

Follow these simple instructions to create a responsive homepage for your website using HTML and CSS:

  1. Create a folder and give it any name you like, then place all necessary files inside.
  2. Create an index.html file as the leading directory.
  3. Create a style.css file containing your CSS code.

Add this HTML code to your index.html file. It includes essential HTML markup with semantic tags like header, navigation, H2, and UL li buttons. This code provides a foundation for building an effective website homepage.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Responsive Website Homepage HTML and CSS</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <header class="header">
      <nav class="navbar">
        <h2 class="logo"><a href="#">abhikesh</a></h2>
        <input type="checkbox" id="menu-toggle" />
        <label for="menu-toggle" id="hamburger-btn">
          <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
            <path d="M3 12h18M3 6h18M3 18h18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
          </svg>
        </label>
        <ul class="links">
          <li><a href="#">Home</a></li>
          <li><a href="#">About Us</a></li>
          <li><a href="#">Services</a></li>
          <li><a href="#">Portfolio</a></li>
          <li><a href="#">Contact Us</a></li>
        </ul>
        <div class="buttons">
          <a href="#" class="signin">Sign In</a>
          <a href="#" class="signup">Sign Up</a>
        </div>
      </nav>
    </header>
    <section class="hero-section">
      <div class="hero">
        <h2>Mobile App Development</h2>
        <p>
          Join us in the exciting world of programming and turn your ideas into
          reality. Unlock the world of endless possibilities - learn to code and
          shape the digital future with us.
        </p>
        <div class="buttons">
          <a href="#" class="join">Join Now</a>
          <a href="#" class="learn">Learn More</a>
        </div>
      </div>
      <div class="img">
        <img src="https://abhikesh.com/blogs/wp-content/uploads/2023/10/hero-bg.png" alt="hero image" />
      </div>
    </section>
  </body>
</html>

Add these CSS codes to your style.css to apply visual styling on the homepage, such as colours, fonts, backgrounds, etc. Now that the CSS codes have been added, you can load up your web browser and enjoy an attractive and responsive homepage for your website!

/* Importing Google font - Open Sans */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  height: 100vh;
  width: 100%;
  background: linear-gradient(to bottom, #175d69 23%, #330c43 95%);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.navbar .logo a {
  font-size: 1.8rem;
  text-decoration: none;
  color: #fff;
}

.navbar .links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 35px;
}

.navbar .links a {
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  padding: 10px 0;
  transition: 0.2s ease;
}

.navbar .links a:hover {
  color: #47b2e4;
}

.navbar .buttons a {
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  padding: 15px 0;
  transition: 0.2s ease;
}

.navbar .buttons a:not(:last-child) {
  margin-right: 30px;
}

.navbar .buttons .signin:hover {
  color: #47b2e4;
}

.navbar .buttons .signup {
  border: 1px solid #fff;
  padding: 10px 20px;
  border-radius: 0.375rem;
  text-align: center;
  transition: 0.2s ease;
}

.navbar .buttons .signup:hover {
  background-color: #47b2e4;
  color: #fff;
}

.hero-section {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 95vh;
  padding: 0 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-section .hero {
  max-width: 50%;
  color: #fff;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #c9c7c7;
}

.hero-section .img img {
  width: 517px;
}

.hero-section .buttons {
  margin-top: 40px;
}

.hero-section .buttons a {
  text-decoration: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 0.375rem;
  font-weight: 600;
  transition: 0.2s ease;
  display: inline-block;
}

.hero-section .buttons a:not(:last-child) {
  margin-right: 15px;
}

.buttons .join {
  background-color: #47b2e4;
}

.hero-section .buttons .learn {
  border: 1px solid #fff;
  border-radius: 0.375rem;
}

.hero-section .buttons a:hover {
  background-color: #47b2e4;
}

/* Hamburger menu styles */
#menu-toggle {
  display: none;
}

#hamburger-btn {
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  display: none;
  order: 1;
}

@media screen and (max-width: 1023px) {
  .navbar .logo a {
    font-size: 1.5rem;
  }

  .links {
    position: fixed;
    left: -100%;
    top: 75px;
    width: 100%;
    height: 100vh;
    padding-top: 50px;
    background: #175d69;
    flex-direction: column;
    transition: 0.3s ease;
  }

  .navbar #menu-toggle:checked ~ .links {
    left: 0;
  }

  .navbar #hamburger-btn {
    display: block;
  }

  .header .buttons {
    display: none;
  }

  .hero-section .hero {
    max-width: 100%;
    text-align: center;
  }

  .hero-section img {
    display: none;
  }
}

Final words and conclusion.

Conclusion: Establishing your website’s homepage can be an enjoyable and productive first project for web developers just starting out. Following the steps outlined here should have resulted in creating your first responsive site homepage using HTML and CSS.

Remember to personalize and customize your website by adding personal touches that make it even more beautiful. Why not recreate other beautiful website designs on this site to expand your HTML/CS knowledge? These designs range from simple homepage layouts to complete website designs!

Clicking the Download button will allow you to quickly download all of the source code for this project.

Hello friends, In this blog post, you will learn how to build a Working Contact Form using PHP. This form will use HTML, CSS, JavaScript, and PHP. I previously demonstrated how to send emails using PHP on Localhost; now, let’s use that knowledge to make an accessible PHP contact form!

Contact Forms are an integral website component, enabling visitors to communicate directly with its owner. A Contact Form may include fields for visitors to submit information like their name, email address, subject of message, etc. You can customize its fields according to your website requirements.

As can be seen from the image, this project [Contact form in PHP] features a contact page with dynamic status text that responds to the form’s status and tells users if their message was sent successfully or not. Furthermore, this form has been fully validated, so users cannot submit messages unless they enter valid message text and email address data; moreover, it comes complete with a video tutorial or demo for easy learning purposes.

Read through this blog to fully understand how this contact form was built using PHP. Unlike a regular contact form, which refreshes when the message has been sent or failed, my contact form utilizes JavaScript Ajax technology instead. It sends all data (name, email, phone, web address, and message) directly from Ajax back to PHP for processing.

First, I verified that the user had entered a valid email address and message, as this information is required by law. I then sent this data using PHP’s mail() function.

If the message could not be delivered because of an invalid email address, an empty message field, or network issues, I sent a notification detailing why. This information was then displayed using JavaScript on the contact form.

Check out this:

Create a functional contact form in PHP [Source Codes]

Create this project [Contact form in PHP]. First, four files, HTML, CSS, and JavaScript, will be created. Copy and paste the codes below after creating these files into each of them – after making all four, you may download its source code, which consists of both PHP and JavaScript code.

Create an HTML file named index.html, copy and paste the provided codes into it, and save it as an .html file.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Contact Form in PHP</title>
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
</head>
<body>
  <div class="wrapper">
    <header>Send us a Message</header>
    <form action="#">
      <div class="dbl-field">
        <div class="field">
          <input type="text" name="name" placeholder="Enter your name">
          <i class='fas fa-user'></i>
        </div>
        <div class="field">
          <input type="text" name="email" placeholder="Enter your email">
          <i class='fas fa-envelope'></i>
        </div>
      </div>
      <div class="dbl-field">
        <div class="field">
          <input type="text" name="phone" placeholder="Enter your phone">
          <i class='fas fa-phone-alt'></i>
        </div>
        <div class="field">
          <input type="text" name="website" placeholder="Enter your website">
          <i class='fas fa-globe'></i>
        </div>
      </div>
      <div class="message">
        <textarea placeholder="Write your message" name="message"></textarea>
        <i class="material-icons">message</i>
      </div>
      <div class="button-area">
        <button type="submit">Send Message</button>
        <span></span>
      </div>
    </form>
  </div>
  <script src="script.js"></script>
</body>
</html>

Create a CSS Style Sheet named style.css and copy and paste all your codes. For best results, give this file the extension .css.

/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body{
  display: flex;
  padding: 0 10px;
  min-height: 100vh;
  background: #0D6EFD;
  align-items: center;
  justify-content: center;
}
::selection{
  color: #fff;
  background: #0D6EFD;
}
.wrapper{
  width: 715px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 10px 10px 10px rgba(0,0,0,0.05);
}
.wrapper header{
  font-size: 22px;
  font-weight: 600;
  padding: 20px 30px;
  border-bottom: 1px solid #ccc;
}
.wrapper form{
  margin: 35px 30px;
}
.wrapper form.disabled{
  pointer-events: none;
  opacity: 0.7;
}
form .dbl-field{
  display: flex;
  margin-bottom: 25px;
  justify-content: space-between;
}
.dbl-field .field{
  height: 50px;
  display: flex;
  position: relative;
  width: calc(100% / 2 - 13px);
}
.wrapper form i{
  position: absolute;
  top: 50%;
  left: 18px;
  color: #ccc;
  font-size: 17px;
  pointer-events: none;
  transform: translateY(-50%);
}
form .field input,
form .message textarea{
  width: 100%;
  height: 100%;
  outline: none;
  padding: 0 18px 0 48px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
}
.field input::placeholder,
.message textarea::placeholder{
  color: #ccc;
}
.field input:focus,
.message textarea:focus{
  padding-left: 47px;
  border: 2px solid #0D6EFD;
}
.field input:focus ~ i,
.message textarea:focus ~ i{
  color: #0D6EFD;
}
form .message{
  position: relative;
}
form .message i{
  top: 30px;
  font-size: 20px;
}
form .message textarea{
  min-height: 130px;
  max-height: 230px;
  max-width: 100%;
  min-width: 100%;
  padding: 15px 20px 0 48px;
}
form .message textarea::-webkit-scrollbar{
  width: 0px;
}
.message textarea:focus{
  padding-top: 14px;
}
form .button-area{
  margin: 25px 0;
  display: flex;
  align-items: center;
}
.button-area button{
  color: #fff;
  border: none;
  outline: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: 5px;
  padding: 13px 25px;
  background: #0D6EFD;
  transition: background 0.3s ease;
}
.button-area button:hover{
  background: #025ce3;
}
.button-area span{
  font-size: 17px;
  margin-left: 30px;
  display: none;
}
@media (max-width: 600px){
  .wrapper header{
    text-align: center;
  }
  .wrapper form{
    margin: 35px 20px;
  }
  form .dbl-field{
    flex-direction: column;
    margin-bottom: 0px;
  }
  form .dbl-field .field{
    width: 100%;
    height: 45px;
    margin-bottom: 20px;
  }
  form .message textarea{
    resize: none;
  }
  form .button-area{
    margin-top: 20px;
    flex-direction: column;
  }
  .button-area button{
    width: 100%;
    padding: 11px 0;
    font-size: 16px;
  }
  .button-area span{
    margin: 20px 0 0;
    text-align: center;
  }
}

Create a JavaScript file called script.js, copy-paste the codes, and save it as an actual.js file.

//Contact Form in PHP
const form = document.querySelector("form"),
statusTxt = form.querySelector(".button-area span");
form.onsubmit = (e)=>{
  e.preventDefault();
  statusTxt.style.color = "#0D6EFD";
  statusTxt.style.display = "block";
  statusTxt.innerText = "Sending your message...";
  form.classList.add("disabled");

  let xhr = new XMLHttpRequest();
  xhr.open("POST", "message.php", true);
  xhr.onload = ()=>{
    if(xhr.readyState == 4 && xhr.status == 200){
      let response = xhr.response;
      if(response.indexOf("required") != -1 || response.indexOf("valid") != -1 || response.indexOf("failed") != -1){
        statusTxt.style.color = "red";
      }else{
        form.reset();
        setTimeout(()=>{
          statusTxt.style.display = "none";
        }, 3000);
      }
      statusTxt.innerText = response;
      form.classList.remove("disabled");
    }
  }
  let formData = new FormData(form);
  xhr.send(formData);
}

Create a PHP message.php file and copy and paste its codes. After doing this, please enter your email address as the $receiver variable to ensure messages reach their destination.

//Contact Form in PHP
<?php
  $name = htmlspecialchars($_POST['name']);
  $email = htmlspecialchars($_POST['email']);
  $phone = htmlspecialchars($_POST['phone']);
  $website = htmlspecialchars($_POST['website']);
  $message = htmlspecialchars($_POST['message']);

  if(!empty($email) && !empty($message)){
    if(filter_var($email, FILTER_VALIDATE_EMAIL)){
      $receiver = "receiver_email_address"; //enter that email address where you want to receive all messages
      $subject = "From: $name <$email>";
      $body = "Name: $name\nEmail: $email\nPhone: $phone\nWebsite: $website\n\nMessage:\n$message\n\nRegards,\n$name";
      $sender = "From: $email";
      if(mail($receiver, $subject, $body, $sender)){
         echo "Your message has been sent";
      }else{
         echo "Sorry, failed to send your message!";
      }
    }else{
      echo "Enter a valid email address!";
    }
  }else{
    echo "Email and message field is required!";
  }
?>

Your PHP Contact Form is complete! If there are any errors/problems, download the source code files; they’re free. However, it won’t function on localhost; upload it and the .zip files instead to make it work online.
Launch message.php on your computer to upload the file. In this file, $receiver can be set as the email address that should receive messages. When done, save and close out this file before zipping it up and uploading it to web hosting, where it will extract itself. We are ready to accept visitor messages using the PHP Contact Form!

Hello there. I hope that all is going great with you. In this post, you will learn how to create a Toggle Button using HTML, CSS, and JavaScript. I recently designed an adorable shape Toggle Button that you may find appealing; today’s button is simple yet effective.
Toggle buttons can be added to any webpage or application to enable or disable specific aspects. For instance, to turn on Wi-Fi, you would use this type of button. They are helpful on various pages in software programs and other front-end components for similar purposes.
Please look at the image of our toggle button I posted online. As shown, one toggle button is closed while its counterpart opens up, but in reality, there is only one toggle button that we must click to open or close; only its circular part moves.
I believe you can quickly design this toggle button using HTML, CSS, and JavaScript. If you’re having difficulty creating an easy toggle switch, here is the complete source code;

Check out this:

Hamburger Menu Button that Has Loading Animation

Switch Button [Source Code] and Toggle Button (Source Code).

To create an animated Button using HTML, CSS, and JavaScript code, it’s necessary to create two separate files—one HTML and the other CSS. Once these have been made, copy-paste their contents into your document before downloading them in their entirety by clicking the Download Button.

<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>Toggle Button Animation</title>
        <!-- CSS -->
        <link rel="stylesheet" href="css/style.css">
    </head>
    <body>
        <div></div>
        <!-- JavaScript -->
        <script>
            const toggleBtn = document.querySelector(".toggle");
            toggleBtn.addEventListener("click", () => toggleBtn.classList.toggle("active"));
        </script>
    </body>
</html>

 

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7d2ae8;
}
.toggle{
  position: relative;
  height: 12px;
  width: 125px;
  cursor: pointer;
  border-radius: 25px;
  background-color: #fff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
.toggle::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background-color: #7d2ae8;
  border: 10px solid #fff;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
.toggle.active::before{
  left: calc(100% - 70px);
  background-color: #fff;
  border-color: #7d2ae8;
}

Assembling a button-click animation using HTML, CSS, and JavaScript can be both challenging and rewarding – it provides the perfect opportunity to broaden your skills in animation while producing something to share with others.

Button-click animation can be defined as any form of animation activated when someone presses a button on a web page or web app, typically as soon as the individual has pressed that button. These animations may take many forms, such as changing color or size or creating rippled effects, giving additional engagement to websites or applications online.

In this tutorial on this blog, you will learn how to make a button-click animation using HTML, CSS, and JavaScript! After this course, you will have created a button that animates when clicked, producing tiny bubbles, as seen in the picture. Recently, I developed a Chrome Extension, so this project can prove beneficial.

Steps for Creating an Animation Button: Click Animation

Let us show you how to create the Button Click Animation using HTML, CSS, and JavaScript in just two steps:

  • File Outline of Project Structure and Contents
  • Design of Button Click Animations

1. Project File Outline and Contents of Project

To create this animation, two files will be required—index. html and style. CSS contains all the HTML, CSS, and JavaScript codes necessary to build button animation. Let’s create these two files before beginning to add code to them.

Once your files are complete, the next step in creating your Button Click Animation is taking shape.

2. Design of Button Click Animations

At this stage, we’ll design the user interface of our button using HTML and CSS. Once completed, JavaScript can be utilized to animate it when clicked upon.

You can add HTML and JavaScript code to the index.html file to create the framework of an animated button.

<!DOCTYPE html>
<!-- Coding By abhikesh- abhikesh.com -->
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>Button Click Animation</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <button>Click Me</button>
    <script>
      const button = document.querySelector(".button");
      button.addEventListener("click", (e) => {
        e.preventDefault;
        button.classList.add("animate");
        setTimeout(() => {
          button.classList.remove("animate");
        }, 600);
      });
    </script>
  </body>
</html>

Within your style.css file, you can include this CSS code to add styles and create buttons and bubbles. If you would like to change their background color, size, font style, etc., simply modify this code accordingly!

/* Import Google font - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  display: flex;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0faff;
}
.button {
  position: relative;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  color: #fff;
  cursor: pointer;
  background-color: #7d2ae8;
  transition: all 0.2s ease;
}
.button:active {
  transform: scale(0.96);
}
.button:before,
.button:after {
  position: absolute;
  content: "";
  width: 150%;
  left: 50%;
  height: 100%;
  transform: translateX(-50%);
  z-index: -1000;
  background-repeat: no-repeat;
}
.button.animate::before {
  top: -70%;
  background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, transparent 20%, #7d2ae8 20%, transparent 30%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%);
  background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%,
    10% 10%, 18% 18%;
  animation: greentopBubbles ease-in-out 0.6s forwards infinite;
}
@keyframes greentopBubbles {
  0% {
    background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%,
      40% 90%, 55% 90%, 70% 90%;
  }
  50% {
    background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%,
      50% 50%, 65% 20%, 90% 30%;
  }
  100% {
    background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%,
      50% 40%, 65% 10%, 90% 20%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}
.button.animate::after {
  bottom: -70%;
  background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%),
    radial-gradient(circle, #7d2ae8 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
  animation: greenbottomBubbles ease-in-out 0.6s forwards infinite;
}
@keyframes greenbottomBubbles {
  0% {
    background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,
      70% -10%, 70% 0%;
  }
  50% {
    background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%,
      105% 0%;
  }
  100% {
    background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%,
      110% 10%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}

Conclusion and Final Words

By following these steps, you have successfully created the button-click animation. Various animations are available here on this site to help you further hone your animation skills.

If this blog has benefited you, please share it with others. Your assistance helps us continue creating valuable tools and content for the developer community—we appreciate it greatly! Thank you so much for giving back!

Dear Readers, In this blog, you’ll learn how to send mail through the XAMPP server. Previously, I shared my thoughts on setting up XAMPP to send mail via Localhost within PHP; if you haven’t yet posted, please make time to do so first.
At this particular web page program, there is a form for sending mail that requires three inputs: email address, subject, and message. If you click send without filling out all three fields (subject, message, and recipient address fields), an alert stating: All input fields are required! It will appear before clicking send again; after filling in and sending, your message will arrive to its recipient using delivery from an address field that was completed and receiving an acknowledgment message that reads: Your mail was successfully delivered”.
If the mail cannot be delivered successfully, an alert message with “Sorry, failed while sending mail!” will appear. If this explanation does not make sense, check out my comprehensive video tutorial [How to Send Email with PHP and Gmail>>] instead.

You may like these:

How to Send Email using PHP and Gmail [Source Codes]

To create this program, [how to send Email with PHP and Gmail], first create two files, one PHP File and the other CSS File, then add this code into one or both files.
First, create a PHP file named mail.html and copy and paste the codes from here into it. Please keep in mind that all PHP files must include the .php extension for proper functioning.

<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>Send Mail From Localhost</title>
      <link rel="stylesheet" href="style.css">
      <!-- bootstrap cdn link -->
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
   </head>
   <body>
      <div>
         <div>
            <div>
               <h2>
                  Send Message
               </h2>
               <p>
                  Send mail to anyone from localhost.
               </p>
               <!-- starting php code -->
               <?php
                  //first we leave this input field blank
                  $recipient = "";
                  //if user click the send button
                  if(isset($_POST['send'])){
                      //access user entered data
                     $recipient = $_POST['email'];
                     $subject = $_POST['subject'];
                     $message = $_POST['message'];
                     $sender = "From: [email protected]";
                     //if user leave empty field among one of them
                     if(empty($recipient) || empty($subject) || empty($message)){
                         ?>
               <!-- display an alert message if one of them field is empty -->
               <div>
                  <?php echo "All inputs are required!" ?>
               </div>
               <?php
                  }else{
                      // PHP function to send mail
                     if(mail($recipient, $subject, $message, $sender)){
                      ?>
               <!-- display a success message if once mail sent sucessfully -->
               <div>
                  <?php echo "Your mail successfully sent to $recipient"?>
               </div>
               <?php
                  $recipient = "";
                  }else{
                   ?>
               <!-- display an alert message if somehow mail can't be sent -->
               <div>
                  <?php echo "Failed while sending your mail!" ?>
               </div>
               <?php
                  }
                  }
                  }
                  ?> <!-- end of php code -->
               <form action="mail.php" method="POST">
                  <div>
                     <input name="email" type="email" placeholder="Recipients" value="<?php echo $recipient ?>">
                  </div>
                  <div>
                     <input name="subject" type="text" placeholder="Subject">
                  </div>
                  <div>
                     <!-- change this tag name into textarea to show textarea field. Due to more textarea I got an error, so I change the name of this field -->
                     <!-- <changeit cols="30" rows="5" name="message" placeholder="Compose your message.."></changeit> -->
                  </div>
                  <div>
                     <input type="submit" name="send" value="Send" placeholder="Subject">
                  </div>
               </form>
            </div>
         </div>
      </div>
   </body>
</html>

Create the CSS file style.css and copy and paste your codes directly into it. Ensure it ends with an a.css extension for ease of later access.

/* custom css styling */
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
html,body{
    background: #007bff;
}
::selection{
    color: #fff;
    background: #007bff;
}
.container{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Poppins', sans-serif;
}
.container .mail-form{
    background: #fff;
    padding: 25px 35px;
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 
                0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.container form .form-control{
    height: 43px;
    font-size: 15px;
}
.container .mail-form form .form-group .button{
    font-size: 17px!important;
}
.container form .textarea{
    height: 100px;
    resize: none;
}
.container .mail-form h2{
    font-size: 30px;
    font-weight: 600;
}
.container .mail-form p{
    font-size: 14px;
}

Have a successful How to send mail using XAMPP Server and PHP experience! Suppose the code doesn’t work as expected or there are any issues with the files created by clicking the download link. In that case, it is entirely free and immediately available as .zip downloads that you can extract yourself!

Enhance your web development skills by embarking on a practical journey of creating a Fiverr site using HTML and CSS. This tutorial not only allows you to recreate designs from popular platforms like Fiverr but also empowers you to showcase your ability to recreate existing designs.
This blog post presents a straightforward guide on how to build a responsive Fiverr website using only HTML, CSS, and JavaScript. You will confidently learn how to create an interactive homepage featuring navigation bars and place elements on the page with styles matching Fiverr’s.
As we create our Fiverr-inspired homepage, we will explore a range of HTML tags and CSS attributes, such as navigation bars, sections, divs, inputs, links, and others, to craft an appealing layout and ensure an accessible interface.

How to Create a Fiverr Website Using HTML and CSS

  • Follow these instructions to create a responsive Fiverr-inspired Homepage using HTML and CSS:
  • Create a folder, name it, and place all necessary files inside.
  • Create an index.html file as your starting point.
  • Create a style.css file containing CSS code.
  • The Images folder can be downloaded and placed into the project directory for use during development. It includes files for both the Fiverr Logo and Hero Background Image.

Add the HTML codes below to your index.html file for use on mobile screens. These codes provide navigation bars, sections, input fields, and links, in addition to various tags that make up your website. These codes include JavaScript lines for toggling menus on and off.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Fiverr Homepage Clone</title>
  <link rel="stylesheet" href="style.css">
  <!-- Google Icons Link -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0">
</head>
<body>
  <header>
    <nav>
      <a href="#">
        <img src="images/logo.svg" alt="Fiverr Logo">
      </a>
      <ul>
        <li><a href="#">Fiverr Business</a></li>
        <li><a href="#">Explore</a></li>
        <li>
          <a href="#">
            <span>language</span>
            English
          </a>
        </li>
        <li><a href="#">Become a Seller</a></li>
        <li><a href="#">Sign In</a></li>
        <li><a href="#">Join Us</a></li>
        <span id="close-menu-btn">close</span>
      </ul>
      <span id="hamburger-btn">menu</span>
    </nav>
  </header>
  <section>
    <div>
      <h1>Find the right freelance service, right away</h1>
      <form action="#">
        <input type="text" placeholder="Search for any service..." required>
        <button type="sumbit">search</button>
      </form>
      <div>
        Popular:
        <ul>
          <li><a href="#">Webite Design</a></li>
          <li><a href="#">Logo Design</a></li>
          <li><a href="#">WordPress</a></li>
          <li><a href="#">AI Design</a></li>
        </ul>
      </div>
    </div>
  </section>
  <script>
    const header = document.querySelector("header");
    const hamburgerBtn = document.querySelector("#hamburger-btn");
    const closeMenuBtn = document.querySelector("#close-menu-btn");
    // Toggle mobile menu on hamburger button click
    hamburgerBtn.addEventListener("click", () => header.classList.toggle("show-mobile-menu"));
    // Close mobile menu on close button click
    closeMenuBtn.addEventListener("click", () => hamburgerBtn.click());
  </script>
</body>
</html>

Add the CSS codes below to your style.css to replicate the Fiverr Homepage look on your website. These CSS codes feature styles for elements such as color, border, background, and even the image from Fiverr! Additionally, media queries make your website responsive.

/* Importing Google font - Fira Sans */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;500;600;700&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Fira Sans', sans-serif;
}
body {
  background: #1B1B1D;
}
header {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
  padding: 20px;
}
header .navbar {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar .menu-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 30px;
}
.navbar .menu-links li a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s ease;
}
.navbar .menu-links .language-item a {
  display: flex;
  gap: 8px;
  align-items: center;
}
.navbar .menu-links .language-item span {
  font-size: 1.3rem;
}
.navbar .menu-links li a:hover {
  color: #1dbf73;
}
.navbar .menu-links .join-btn a {
  border: 1px solid #fff;
  padding: 8px 15px;
  border-radius: 4px;
}
.navbar .menu-links .join-btn a:hover {
  color: #fff;
  border-color: transparent;
  background: #1dbf73;
}
.hero-section {
  height: 100vh;
  background-image: url("images/hero-img.jpg");
  background-position: center;
  background-size: cover;
  position: relative;
  display: flex;
  padding: 0 20px;
  align-items: center;
}
.hero-section .content {
  max-width: 1280px;
  margin: 0 auto 40px;
  width: 100%;
}
.hero-section .content h1 {
  color: #fff;
  font-size: 3rem;
  max-width: 630px;
  line-height: 65px;
}
.hero-section .search-form {
  height: 48px;
  display: flex;
  max-width: 630px;
  margin-top: 30px;
}
.hero-section .search-form input {
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  padding: 0 15px;
  font-size: 1rem;
  border-radius: 4px 0 0 4px;
}
.hero-section .search-form button {
  height: 100%;
  width: 60px;
  border: none;
  outline: none;
  cursor: pointer;
  background: #1dbf73;
  color: #fff;
  border-radius: 0 4px 4px 0;
  transition: background 0.2s ease;
}
.hero-section .search-form button:hover {
  background: #19a463;
}
.hero-section .popular-tags {
  display: flex;
  color: #fff;
  gap: 25px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 25px;
}
.hero-section .popular-tags .tags {
  display: flex;
  gap: 15px;
  align-items: center;
  list-style: none;
}
.hero-section .tags li a {
  text-decoration: none;
  color: #fff;
  border: 1px solid #fff;
  padding: 4px 12px;
  border-radius: 50px;
  transition: 0.2s ease;
}
.hero-section .tags li a:hover {
  color: #000;
  background: #fff;
}
.navbar #hamburger-btn {
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 1.7rem;
}
.navbar #close-menu-btn {
  position: absolute;
  display: none;
  color: #000;
  top: 20px;
  right: 20px;
  cursor: pointer;
  font-size: 1.7rem;
}
@media screen and (max-width: 900px) {
  header.show-mobile-menu::before {
    content: "";
    height: 100%;
    width: 100%;
    position: fixed;
    left: 0;
    top: 0;
    backdrop-filter: blur(5px);
  }
  .navbar .menu-links {
    height: 100vh;
    max-width: 300px;
    width: 100%;
    background: #fff;
    position: fixed;
    left: -300px;
    top: 0;
    display: block;
    padding: 75px 40px 0;
    transition: left 0.2s ease;
  }
  header.show-mobile-menu .navbar .menu-links {
    left: 0;
  }
  .navbar .menu-links li {
    margin-bottom: 30px;
  }
  .navbar .menu-links li a {
    color: #000;
    font-size: 1.1rem;
  }
  .navbar .menu-links .join-btn a {
    padding: 0;
  }
  .navbar .menu-links .join-btn a:hover {
    color: #1dbf73;
    background: none;
  }
  .navbar :is(#close-menu-btn, #hamburger-btn) {
    display: block;
  }
  .hero-section {
    background: none;
  }
  .hero-section .content {
    margin: 0 auto 80px;
  }
  .hero-section .content :is(h1, .search-form) {
    max-width: 100%;
  }
  .hero-section .content h1 {
    text-align: center;
    font-size: 2.5rem;
    line-height: 55px;
  }
  .hero-section .search-form {
    display: block;
    margin-top: 20px;
  }
  .hero-section .search-form input {
    border-radius: 4px;
  }
  .hero-section .search-form button {
    margin-top: 10px;
    border-radius: 4px;
    width: 100%;
  }
  .hero-section .popular-tags {
    display: none;
  }
}

You may like these:

Conclusion and final remarks.

Building a Fiverr website using HTML, CSS, and JavaScript can be an enjoyable project for new web programmers. You have created an engaging, responsive Fiverr homepage by following the instructions presented here!
Don’t stop here! Keep the inspiration flowing by continuing to experiment and hone your skills. I encourage you to explore and recreate other impressive website designs found here, and let your creativity soar.
Clicking the Download button will provide free access to this Fiverr Homepage’s source files should any issues arise when creating your Fiverr site. Alternatively, click View Live for a live demonstration.

Are You New to Web Development? Building a Website With Login and Registration Documents as PracticeIf you’re just getting into web development, developing a website complete with login and registration paperwork is an ideal way to assess and practice critical competencies such as creating navigation menu bars, developing homepage pages and writing login/registration documents.
I will walk you through creating a responsive website with login and registration forms using HTML, CSS, and JavaScript. By accomplishing this task, you’ll gain practical experience and learn essential web development principles such as DOM manipulation, event handling, conditional statements, etc.
In this task, the website’s homepage features a navigation bar and login button; when clicked, it will reveal an attractive blurred background login form with a picture on the left and input fields on the right side. If you wish to join instead, click the sign-up link, which will take you directly to the registration form.
The navigation bar and documents on this website are fully responsive, which means they will adapt to fit any display size. On smaller displays, for instance, when clicking on a hamburger button to bring up navigation bars, they will appear from the right side, and forms will remain hidden when the left image section remains hidden.
The above YouTube video can be an excellent learning resource if you prefer learning through video tutorials. I have explained each line of code and provided helpful insights that make creating your website with login/registration processes accessible and user-friendly for beginners.
However, if you prefer reading blog posts or need a step-by-step guide, continue reading this publication. By the time it ends, you’ll have created your internet website with forms that are easy to customize and implement for various projects.

Steps for Establishing a Website with Login & Registration Form

Follow these step-by-step instructions to create a responsive internet website featuring login and registration forms with HTML, CSS, and vanilla JavaScript:

  1. First, create a folder with any name you like and store the necessary files.
  2. Create an index.Html report as the main document.
  3. Create a report called style.Css to hold onto CSS code.
  4. Create a document named script.Js to house your JavaScript code.
  5. Download and add the Images folder to your project listing. This folder contains all of the images needed for this undertaking.

Start by uploading the following HTML codes to your index.Html file: header, nav, ul, form, and any extra elements needed for the project.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Website with Login and Registration Form</title>
    <!-- Google Fonts Link For Icons -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,400,0,0">
    <link rel="stylesheet" href="style.css">
    <script src="script.js" defer></script>
</head>
<body>
    <header>
        <nav>
            <span>menu</span>
            <a href="#">
                <img src="images/logo.jpg" alt="logo">
                <h2>CodingNepal</h2>
            </a>
            <ul>
                <span>close</span>
                <li><a href="#">Home</a></li>
                <li><a href="#">Portfolio</a></li>
                <li><a href="#">Courses</a></li>
                <li><a href="#">About us</a></li>
                <li><a href="#">Contact us</a></li>
            </ul>
            <button>LOG IN</button>
        </nav>
    </header>
    <div></div>
    <div>
        <span>close</span>
        <div>
            <div>
                <h2>Welcome Back</h2>
                <p>Please log in using your personal information to stay connected with us.</p>
            </div>
            <div>
                <h2>LOGIN</h2>
                <form action="#">
                    <div>
                        <input type="text" required>
                        <label>Email</label>
                    </div>
                    <div>
                        <input type="password" required>
                        <label>Password</label>
                    </div>
                    <a href="#">Forgot password?</a>
                    <button type="submit">Log In</button>
                </form>
                <div>
                    Don't have an account?
                    <a href="#" id="signup-link">Signup</a>
                </div>
            </div>
        </div>
        <div>
            <div>
                <h2>Create Account</h2>
                <p>To become a part of our community, please sign up using your personal information.</p>
            </div>
            <div>
                <h2>SIGNUP</h2>
                <form action="#">
                    <div>
                        <input type="text" required>
                        <label>Enter your email</label>
                    </div>
                    <div>
                        <input type="password" required>
                        <label>Create password</label>
                    </div>
                    <div>
                        <input type="checkbox" id="policy">
                        <label for="policy">
                            I agree the
                            <a href="#">Terms & Conditions</a>
                        </label>
                    </div>
                    <button type="submit">Sign Up</button>
                </form>
                <div>
                    Already have an account? 
                    <a href="#" id="login-link">Login</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

 
Add these CSS codes to your style.css document for visual styling on your website and documents. Experiment with various CSS properties, such as colours, fonts, and backgrounds, for a truly customized feel on your site.
 

/* Importing Google font - Open Sans */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}
body {
    height: 100vh;
    width: 100%;
    background: url("images/hero-bg.jpg") center/cover no-repeat;
}
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    padding: 0 10px;
}
.navbar {
    display: flex;
    padding: 22px 0;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
}
.navbar .hamburger-btn {
    display: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
}
.navbar .logo {
    gap: 10px;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.navbar .logo img {
    width: 40px;
    border-radius: 50%;
}
.navbar .logo h2 {
    color: #fff;
    font-weight: 600;
    font-size: 1.7rem;
}
.navbar .links {
    display: flex;
    gap: 35px;
    list-style: none;
    align-items: center;
}
.navbar .close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    display: none;
    color: #000;
    cursor: pointer;
}
.navbar .links a {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.1s ease;
}
.navbar .links a:hover {
    color: #19e8ff;
}
.navbar .login-btn {
    border: none;
    outline: none;
    background: #fff;
    color: #275360;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.15s ease;
}
.navbar .login-btn:hover {
    background: #ddd;
}
.form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    max-width: 720px;
    background: #fff;
    border: 2px solid #fff;
    transform: translate(-50%, -70%);
}
.show-popup .form-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.1s;
}
.form-popup .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #878484;
    cursor: pointer;
}
.blur-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    height: 100%;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: 0.1s ease;
}
.show-popup .blur-bg-overlay {
    opacity: 1;
    pointer-events: auto;
}
.form-popup .form-box {
    display: flex;
}
.form-box .form-details {
    width: 100%;
    color: #fff;
    max-width: 330px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.login .form-details {
    padding: 0 40px;
    background: url("images/login-img.jpg");
    background-position: center;
    background-size: cover;
}
.signup .form-details {
    padding: 0 20px;
    background: url("images/signup-img.jpg");
    background-position: center;
    background-size: cover;
}
.form-box .form-content {
    width: 100%;
    padding: 35px;
}
.form-box h2 {
    text-align: center;
    margin-bottom: 29px;
}
form .input-field {
    position: relative;
    height: 50px;
    width: 100%;
    margin-top: 20px;
}
.input-field input {
    height: 100%;
    width: 100%;
    background: none;
    outline: none;
    font-size: 0.95rem;
    padding: 0 15px;
    border: 1px solid #717171;
    border-radius: 3px;
}
.input-field input:focus {
    border: 1px solid #00bcd4;
}
.input-field label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #4a4646;
    pointer-events: none;
    transition: 0.2s ease;
}
.input-field input:is(:focus, :valid) {
    padding: 16px 15px 0;
}
.input-field input:is(:focus, :valid)~label {
    transform: translateY(-120%);
    color: #00bcd4;
    font-size: 0.75rem;
}
.form-box a {
    color: #00bcd4;
    text-decoration: none;
}
.form-box a:hover {
    text-decoration: underline;
}
form :where(.forgot-pass-link, .policy-text) {
    display: inline-flex;
    margin-top: 13px;
    font-size: 0.95rem;
}
form button {
    width: 100%;
    color: #fff;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    margin: 25px 0;
    background: #00bcd4;
    transition: 0.2s ease;
}
form button:hover {
    background: #0097a7;
}
.form-content .bottom-link {
    text-align: center;
}
.form-popup .signup,
.form-popup.show-signup .login {
    display: none;
}
.form-popup.show-signup .signup {
    display: flex;
}
.signup .policy-text {
    display: flex;
    margin-top: 14px;
    align-items: center;
}
.signup .policy-text input {
    width: 14px;
    height: 14px;
    margin-right: 7px;
}
@media (max-width: 950px) {
    .navbar :is(.hamburger-btn, .close-btn) {
        display: block;
    }
    .navbar {
        padding: 15px 0;
    }
    .navbar .logo img {
        display: none;
    }
    .navbar .logo h2 {
        font-size: 1.4rem;
    }
    .navbar .links {
        position: fixed;
        top: 0;
        z-index: 10;
        left: -100%;
        display: block;
        height: 100vh;
        width: 100%;
        padding-top: 60px;
        text-align: center;
        background: #fff;
        transition: 0.2s ease;
    }
    .navbar .links.show-menu {
        left: 0;
    }
    .navbar .links a {
        display: inline-flex;
        margin: 20px 0;
        font-size: 1.2rem;
        color: #000;
    }
    .navbar .links a:hover {
        color: #00BCD4;
    }
    .navbar .login-btn {
        font-size: 0.9rem;
        padding: 7px 10px;
    }
}
@media (max-width: 760px) {
    .form-popup {
        width: 95%;
    }
    .form-box .form-details {
        display: none;
    }
    .form-box .form-content {
        padding: 30px 20px;
    }
}

Once the patterns have been applied, load the website in your browser to view your creation. While the forms may be hidden, they will become visible in JavaScript later. At present, only its navigation bar and hero image will be visible.
Add the following JavaScript code into your script.Js file: It includes click event listeners, allowing classes to be toggled on various HTML points. Although it’s easy to understand, it may help to watch the above video tutorial and review code feedback before performing experiments.

const navbarMenu = document.querySelector(".navbar .links");
const hamburgerBtn = document.querySelector(".hamburger-btn");
const hideMenuBtn = navbarMenu.querySelector(".close-btn");
const showPopupBtn = document.querySelector(".login-btn");
const formPopup = document.querySelector(".form-popup");
const hidePopupBtn = formPopup.querySelector(".close-btn");
const signupLoginLink = formPopup.querySelectorAll(".bottom-link a");
// Show mobile menu
hamburgerBtn.addEventListener("click", () => {
    navbarMenu.classList.toggle("show-menu");
});
// Hide mobile menu
hideMenuBtn.addEventListener("click", () =>  hamburgerBtn.click());
// Show login popup
showPopupBtn.addEventListener("click", () => {
    document.body.classList.toggle("show-popup");
});
// Hide login popup
hidePopupBtn.addEventListener("click", () => showPopupBtn.click());
// Show or hide signup form
signupLoginLink.forEach(link => {
    link.addEventListener("click", (e) => {
        e.preventDefault();
        formPopup.classList[link.id === 'signup-link' ? 'add' : 'remove']("show-signup");
    });
});

Conclusion and Final Phrases.

Making a website’s homepage with paperwork is an engaging, hands-on learning experience for exploring various website components and general web development principles. By following the steps outlined in this blog post, I believe you have successfully created your own login/registration website using HTML, CSS, and JavaScript technologies.
As part of your efforts to further your web development skills, recreating some of the websites and login form projects offered on this website will give you a deeper understanding of how HTML, CSS and JavaScript work together to produce distinctive website elements.
If you encounter difficulties building your website with forms, you can download the source code files free of charge by clicking the Download button and viewing a live demo by pressing View Live.

Hello friend! I hope your project is progressing well, and I look forward to meeting and making memories with you soon! This weblog post will teach you to create a responsive Testimonial Slider using HTML/CSS and SwiperJs/JavaScript/SwiperJS. I have also made numerous sliding cards using HTML/CSS or combining both techniques!

Testimonials are reviews of products and offerings. For instance, testimonials on a coffee shop website may include reviews where various customers leave opinions about said coffee shop’s coffee.

Please glance at our project [Testimonial Slider]; you can easily spot an image and review the text of an individual on a product or service at the bottom. There is also a quote icon and their name/process at the right and left sides, with three-dot buttons showing that it can be slideable when we click either right or left on the nav button to move right or left, and another person’s quote will be revealed; you may even grab and slide mouse right or left to change between content material slideshow modes!

Let’s watch a demo of this testimonial and all the HTML, CSS, and JavaScript code used to build this mission [Testimonial Slider].

As promised, I have enclosed all the HTML, CSS and JavaScript code used to build this Testimonial Slider. However, before going further into its code file, allow me to describe its academic context briefly.

As seen within the video tutorial of [Testimonial Slider], there is a wase containing several testimonial textual content, including its name and jot of character. At the bottom of that testimonial content, there were three dots, and on both the right and left sides, there were navigation buttons; when I clicked the right side button, it slid right-side until proper-side content appeared, whereas grabbing and shifting my mouse right or left would cause it to slide left or right respectively.

We realized our testimonial had become completely responsive; when I reduced its width, it perfectly fit onto the display screen. Once our testimonial width reached tablet screen sizes, its nav button disappeared since we could slide it with our fingers.

Now, I hope you can post this testimonial using HTML, CSS, JavaScript, and SwiperJs. If you encounter difficulty creating it yourself, please use my source code below as a starting point.

Testimonial Slider [Source Code]

To generate HTML, CSS, and JavaScript code for a Testimonial Slider, three files must be developed: an HTML report, a CSS document, and a JavaScript report. Having done so, copy/paste any given codes directly into your document—alternatively, download them all using the provided download button.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Responsive Testimonial Slider</title>

 

    <!-- Swiper CSS -->
    <link rel="stylesheet" href="css/swiper-bundle.min.css" />

    <!-- CSS -->
    <link rel="stylesheet" href="css/style.css" />

    <!-- Boxicons CSS -->
    <link href="https://unpkg.com/[email protected]/css/boxicons.min.css" rel="stylesheet" />
</head>
<body>
    <section>
        <div>
            <div>
                <div>
                    <img src="#" alt="" />
                    <p>
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam,
                        saepe provident dolorem a quaerat quo error facere nihil deleniti
                        eligendi ipsum adipisci, fugit, architecto amet asperiores
                        doloremque deserunt eum nemo.
                    </p>

                    <i></i>

                    <div>
                        <span>Marnie Lotter</span>
                        <span>Web Developer</span>
                    </div>
                </div>
                <div>
                    <img src="#" alt="" />
                    <p>
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam,
                        saepe provident dolorem a quaerat quo error facere nihil deleniti
                        eligendi ipsum adipisci, fugit, architecto amet asperiores
                        doloremque deserunt eum nemo.
                    </p>

                    <i></i>

                    <div>
                        <span>Marnie Lotter</span>
                        <span>Web Developer</span>
                    </div>
                </div>
                <div>
                    <img src="#" alt="" />
                    <p>
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam,
                        saepe provident dolorem a quaerat quo error facere nihil deleniti
                        eligendi ipsum adipisci, fugit, architecto amet asperiores
                        doloremque deserunt eum nemo.
                    </p>

                    <i></i>

                    <div>
                        <span>Marnie Lotter</span>
                        <span>Web Developer</span>
                    </div>
                </div>
            </div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </section>

    <!-- Swiper JS -->
    <script src="js/swiper-bundle.min.js"></script>
    <!-- JavaScript -->
    <script src="js/script.js"></script>
</body>
</html>

CSS :

/* Google Fonts - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
.container {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e3f2fd;
}
.testimonial {
  position: relative;
  max-width: 900px;
  width: 100%;
  padding: 50px 0;
  overflow: hidden;
}
.testimonial .image {
  height: 170px;
  width: 170px;
  object-fit: cover;
  border-radius: 50%;
}
.testimonial .slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  row-gap: 30px;
  height: 100%;
  width: 100%;
}
.slide p {
  text-align: center;
  padding: 0 160px;
  font-size: 14px;
  font-weight: 400;
  color: #333;
}
.slide .quote-icon {
  font-size: 30px;
  color: #4070f4;
}
.slide .details {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.details .name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.details .job {
  font-size: 12px;
  font-weight: 400;
  color: #333;
}
/* swiper button css */
.nav-btn {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  transform: translateY(30px);
  background-color: rgba(0, 0, 0, 0.1);
  transition: 0.2s;
}
.nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.2);
}
.nav-btn::after,
.nav-btn::before {
  font-size: 20px;
  color: #fff;
}
.swiper-pagination-bullet {
  background-color: rgba(0, 0, 0, 0.8);
}
.swiper-pagination-bullet-active {
  background-color: #4070f4;
}
@media screen and (max-width: 768px) {
  .slide p {
    padding: 0 20px;
  }
  .nav-btn {
    display: none;
  }
}

JS:

 var swiper = new Swiper(".mySwiper", {
  slidesPerView: 1,
  grabCursor: true,
  loop: true,
  pagination: {
    el: ".swiper-pagination",
    clickable: true,
  },
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
});

If you experience issues while developing your Testimonial Slider or have code that isn’t running as expected, you can download its source code documents free of cost by clicking on the download button and view a live demo by pressing the view live button.