How to make a Word Counter tool website using Chat GPT.

Hello friends, in this article we are giving you the code of the word counter tool website. This code is written in HTML CSS & Javascript. Below you will find its code. You can copy it and create a word counter website for yourself. Thank you

HTML, CSS, and Javascript Code of the word counter tool

<!DOCTYPE html>
      <meta charset="UTF-8">
      <title>Word Counter</title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link rel="stylesheet" href="style.css">
         <h1>Word Counter</h1>
         <div id="input-area">
            <textarea id="input" rows="10" cols="50"></textarea>
            <button id="count-btn">Count Words</button>
         <div id="result"></div>
         <p>Copyright © 2022 Word Counter.
      <script src="script.js"></script>
body {
    margin: 0;
    font-family: Arial, sans-serif;
 header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
 header h1 {
    margin: 0;
 main {
    padding: 20px;
 #input-area {
    margin-bottom: 20px;
 #result {
    font-size: 20px;
    font-weight: bold;
 footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
const input = document.getElementById('input');
const countBtn = document.getElementById('count-btn');
const result = document.getElementById('result');

countBtn.addEventListener('click', () => {
   const text = input.value.trim();
   const words = text.split(/\s+/);
   result.textContent = `Word Count: ${words.length}`;