{"id":147,"date":"2024-07-26T03:40:13","date_gmt":"2024-07-26T03:40:13","guid":{"rendered":"https:\/\/codingindialab.com\/blog\/?p=138"},"modified":"2026-04-06T04:59:24","modified_gmt":"2026-04-06T04:59:24","slug":"how-to-create-word-and-character-counter-using-html-css-and-javascript","status":"publish","type":"post","link":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/","title":{"rendered":"How to create Word Counter using HTML CSS and JavaScript"},"content":{"rendered":"<h2>Word and Character Counter using HTML CSS and JavaScript Full Details<\/h2>\n<div>You can learn to create Word and Character counter using <a href=\"https:\/\/codingindialab.com\/blog\/category\/html\/\">HTML<\/a> CSS and <a href=\"https:\/\/codingindialab.com\/blog\/category\/jquery\/\">JavaScript<\/a>. We are providing complete guide here which will explain all the steps step by step and you can create it by following it.<\/div>\n<div><\/div>\n<div><strong>Word<\/strong>, <strong>Character<\/strong>, <strong>Sentence<\/strong> and <strong>Paragraph<\/strong> Counter is an application which counts the words and characters in textarea. It is designed using <a href=\"https:\/\/codingindialab.com\/blog\/category\/html\/\">HTML<\/a>, CSS and <a href=\"https:\/\/codingindialab.com\/blog\/category\/jquery\/\">JavaScript<\/a>. User can type text in text area and Word Counter will show the number of words and characters typed by them.<\/div>\n<h2>Project Details<\/h2>\n<ul>\n<li>Project Introduction<\/li>\n<li>HTML Code<\/li>\n<li>CSS Code<\/li>\n<li>JavaScript Code<\/li>\n<li>Preview<\/li>\n<\/ul>\n<h2>Project Introduction<\/h2>\n<div><strong>To make this you will need the following:<\/strong><\/div>\n<ul>\n<li>Basic knowledge of HTML, CSS, and JavaScript.<\/li>\n<li>A code\u00a0 editor (e.g.,Notpad++, Subline, Visual Studio Code).<\/li>\n<li>Web browser for testing.<\/li>\n<\/ul>\n<h2>HTML Details<\/h2>\n<div>To start you need to create an HTML structure for the word counter. Go to your local system, open an editor and create a file in HTML. Use a simple form in the text area and add an element to count the paragraphs.<\/div>\n<div><\/div>\n<div><strong>How to do it:<\/strong><\/div>\n<ul>\n<li>Open your code editor.<\/li>\n<li>Create an HTML file.<\/li>\n<li>Design a form with a textarea for user input.<\/li>\n<li>Add an element (e.g., a &lt;div&gt;) to display the word and character count.<\/li>\n<li>Link your CSS and JavaScript files.<\/li>\n<\/ul>\n<h2>\u00a0HTML Code:<\/h2>\n<div>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang=&#8221;en&#8221;&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;meta charset=&#8221;UTF-8&#8243; \/&gt;<br \/>\n&lt;meta http-equiv=&#8221;X-UA-Compatible&#8221; content=&#8221;IE=edge&#8221; \/&gt;<br \/>\n&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, initial-scale=1.0&#8243; \/&gt;<br \/>\n&lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;link href=&#8221;https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@300;400;500;600;700&amp;display=swap&#8221; rel=&#8221;stylesheet&#8221;&gt;<br \/>\n&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;styles.css&#8221; \/&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<\/p>\n<p>&lt;h1&gt;Word Counter&lt;\/h1&gt;<br \/>\n&lt;div class=&#8221;container&#8221;&gt;<br \/>\n&lt;textarea placeholder=&#8221;Enter your text here&#8230;&#8221;&gt;&lt;\/textarea&gt;<br \/>\n&lt;div class=&#8221;output-container&#8221;&gt;<br \/>\n&lt;div class=&#8221;output&#8221;&gt;<br \/>\n&lt;p class=&#8221;words&#8221;&gt;Words&lt;\/p&gt;<br \/>\n&lt;span data-word-count&gt;0&lt;\/span&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;div class=&#8221;output&#8221;&gt;<br \/>\n&lt;p class=&#8221;characters&#8221;&gt;Characters&lt;\/p&gt;<br \/>\n&lt;span data-character-count&gt;0&lt;\/span&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;div class=&#8221;output&#8221;&gt;<br \/>\n&lt;p class=&#8221;sentences&#8221;&gt;Sentences&lt;\/p&gt;<br \/>\n&lt;span data-sentence-count&gt;0&lt;\/span&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;div class=&#8221;output&#8221;&gt;<br \/>\n&lt;p class=&#8221;paragraphs&#8221;&gt;Paragraphs&lt;\/p&gt;<br \/>\n&lt;span data-paragraph-count&gt;0&lt;\/span&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;script src=&#8221;script.js&#8221; defer&gt;&lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p>\n<\/div>\n<h2>CSS Code:<\/h2>\n<div>\n<div>\u00a0 \u00a0 &lt;style&gt;<\/div>\n<div>* {<\/div>\n<div>\u00a0 margin: 0;<\/div>\n<div>\u00a0 padding: 0;<\/div>\n<div>\u00a0 box-sizing: border-box;<\/div>\n<div>}<\/div>\n<div>body {<\/div>\n<div>\u00a0 font-family: Poppins;<\/div>\n<div>\u00a0 background-color: #ffbf47;<\/div>\n<div>\u00a0 color: #a09fa4;<\/div>\n<div>\u00a0 height: 100vh;<\/div>\n<div>\u00a0 display: flex;<\/div>\n<div>\u00a0 flex-direction: column;<\/div>\n<div>\u00a0 justify-content: center;<\/div>\n<div>\u00a0 gap: 5rem;<\/div>\n<div>}<\/div>\n<div>.container {<\/div>\n<div>\u00a0 width: 100%;<\/div>\n<div>\u00a0 max-width: 46rem;<\/div>\n<div>\u00a0 background-color: white;<\/div>\n<div>\u00a0 border-radius: 0.5rem;<\/div>\n<div>\u00a0 margin: 0 auto;<\/div>\n<div>\u00a0 display: flex;<\/div>\n<div>\u00a0 flex-direction: column;<\/div>\n<div>\u00a0 gap: 1rem;<\/div>\n<div>}<\/div>\n<div>textarea {<\/div>\n<div>\u00a0 resize: none;<\/div>\n<div>\u00a0 width: 100%;<\/div>\n<div>\u00a0 height: 250px;<\/div>\n<div>\u00a0 padding: 1rem;<\/div>\n<div>\u00a0 color: #242e3e;<\/div>\n<div>\u00a0 font: inherit;<\/div>\n<div>\u00a0 font-size: 1rem;<\/div>\n<div>\u00a0 border-radius: inherit;<\/div>\n<div>\u00a0 outline: none;<\/div>\n<div>\u00a0 border: 0;<\/div>\n<div>}<\/div>\n<div>.output-container {<\/div>\n<div>\u00a0 display: flex;<\/div>\n<div>\u00a0 align-items: center;<\/div>\n<div>\u00a0 justify-content: center;<\/div>\n<div>\u00a0 gap: 3.5rem;<\/div>\n<div>\u00a0 padding: 1rem;<\/div>\n<div>\u00a0 border-top: 1px solid gray;<\/div>\n<div>}<\/div>\n<div>.output {<\/div>\n<div>\u00a0 display: flex;<\/div>\n<div>\u00a0 flex-direction: column;<\/div>\n<div>\u00a0 text-align: center;<\/div>\n<div>}<\/div>\n<div>.output p {<\/div>\n<div>\u00a0 font-size: 0.8rem;<\/div>\n<div>\u00a0 text-transform: uppercase;<\/div>\n<div>\u00a0 letter-spacing: 1px;<\/div>\n<div>}<\/div>\n<div>.output span {<\/div>\n<div>\u00a0 font-size: 1.6rem;<\/div>\n<div>\u00a0 font-weight: 700;<\/div>\n<div>\u00a0 color: #242e3e;<\/div>\n<div>}<\/div>\n<div>h1 {<\/div>\n<div>\u00a0 \u00a0 font-size: 2.6rem;<\/div>\n<div>\u00a0 \u00a0 color: #000;<\/div>\n<div>\u00a0 \u00a0 text-align: center;<\/div>\n<div>\u00a0 \u00a0 width: 100%;<\/div>\n<div>\u00a0 \u00a0 margin: 0 auto;<\/div>\n<div>\u00a0 \u00a0 padding: 0 20px;<\/div>\n<div>}<\/div>\n<div>&lt;\/style&gt;<\/div>\n<\/div>\n<h2>JavaScript Code<\/h2>\n<div>\n<div>&lt;script&gt;<\/div>\n<div>const input = document.querySelector(&#8220;textarea&#8221;);<\/div>\n<div>const wordCount = document.querySelector(&#8220;[data-word-count]&#8221;);<\/div>\n<div>const characterCount = document.querySelector(&#8220;[data-character-count]&#8221;);<\/div>\n<div>const sentenceCount = document.querySelector(&#8220;[data-sentence-count]&#8221;);<\/div>\n<div>const paragraphCount = document.querySelector(&#8220;[data-paragraph-count]&#8221;);<\/div>\n<div>input.addEventListener(&#8220;input&#8221;, function () {<\/div>\n<div>\u00a0 if (input.value) {<\/div>\n<div>\u00a0 \u00a0 \/\/ Count Words<\/div>\n<div>\u00a0 \u00a0 const wordsArray = input.value.split(&#8221; &#8220;).filter((word) =&gt; word !== &#8220;&#8221;);<\/div>\n<div>\u00a0 \u00a0 wordCount.innerText = wordsArray.length;<\/div>\n<div>\u00a0 \u00a0 \/\/ Count Characters<\/div>\n<div>\u00a0 \u00a0 characterCount.innerText = input.value.length;<\/div>\n<div>\u00a0 \u00a0 \/\/ Count Sentences<\/div>\n<div>\u00a0 \u00a0 const sentenceArray = input.value.split(\/[.!]\/);<\/div>\n<div>\u00a0 \u00a0 sentenceCount.innerText = sentenceArray.length &#8211; 1;<\/div>\n<div>\u00a0 \u00a0 \/\/ Count Paragraph<\/div>\n<div>\u00a0 \u00a0 const paragraphArray = input.value<\/div>\n<div>\u00a0 \u00a0 \u00a0 .split(&#8220;\\n&#8221;)<\/div>\n<div>\u00a0 \u00a0 \u00a0 .filter((p) =&gt; p.trim() !== &#8220;&#8221;);<\/div>\n<div><\/div>\n<div>\u00a0 \u00a0 paragraphCount.innerText = paragraphArray.length;<\/div>\n<div>\u00a0 } else {<\/div>\n<div>\u00a0 \u00a0 wordCount.innerText =<\/div>\n<div>\u00a0 \u00a0 \u00a0 characterCount.innerText =<\/div>\n<div>\u00a0 \u00a0 \u00a0 sentenceCount.innerText =<\/div>\n<div>\u00a0 \u00a0 \u00a0 paragraphCount.innerText =<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 0;<\/div>\n<div>\u00a0 }<\/div>\n<div>});<\/div>\n<div>&lt;\/script&gt;<\/div>\n<\/div>\n<div>\n<h2>Preview<\/h2>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-139\" src=\"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25.png?resize=640%2C354&#038;ssl=1\" alt=\"\" width=\"640\" height=\"354\" \/><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Word and Character Counter using HTML CSS and JavaScript Full Details You can learn to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":216,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,3],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to create Word Counter using HTML CSS and JavaScript<\/title>\n<meta name=\"description\" content=\"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create Word Counter using HTML CSS and JavaScript\" \/>\n<meta property=\"og:description\" content=\"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Buy Tools - Coding India Lab\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-26T03:40:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-06T04:59:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"566\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/#\\\/schema\\\/person\\\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce\"},\"headline\":\"How to create Word Counter using HTML CSS and JavaScript\",\"datePublished\":\"2024-07-26T03:40:13+00:00\",\"dateModified\":\"2026-04-06T04:59:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/\"},\"wordCount\":671,\"image\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/codingindialab.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1\",\"articleSection\":[\"html\",\"jquery\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/\",\"url\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/\",\"name\":\"How to create Word Counter using HTML CSS and JavaScript\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/codingindialab.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1\",\"datePublished\":\"2024-07-26T03:40:13+00:00\",\"dateModified\":\"2026-04-06T04:59:24+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/#\\\/schema\\\/person\\\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce\"},\"description\":\"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/codingindialab.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/codingindialab.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1\",\"width\":1024,\"height\":566,\"caption\":\"How to create Word and Character Counter using HTML CSS and JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/how-to-create-word-and-character-counter-using-html-css-and-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create Word Counter using HTML CSS and JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/\",\"name\":\"Coding India\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/#\\\/schema\\\/person\\\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/codingindialab.com\\\/blog\"],\"url\":\"https:\\\/\\\/codingindialab.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create Word Counter using HTML CSS and JavaScript","description":"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/","og_locale":"en_US","og_type":"article","og_title":"How to create Word Counter using HTML CSS and JavaScript","og_description":"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.","og_url":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/","og_site_name":"Buy Tools - Coding India Lab","article_published_time":"2024-07-26T03:40:13+00:00","article_modified_time":"2026-04-06T04:59:24+00:00","og_image":[{"width":1024,"height":566,"url":"https:\/\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#article","isPartOf":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/"},"author":{"name":"admin","@id":"https:\/\/codingindialab.com\/blog\/#\/schema\/person\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce"},"headline":"How to create Word Counter using HTML CSS and JavaScript","datePublished":"2024-07-26T03:40:13+00:00","dateModified":"2026-04-06T04:59:24+00:00","mainEntityOfPage":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/"},"wordCount":671,"image":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1","articleSection":["html","jquery"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/","url":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/","name":"How to create Word Counter using HTML CSS and JavaScript","isPartOf":{"@id":"https:\/\/codingindialab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#primaryimage"},"image":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1","datePublished":"2024-07-26T03:40:13+00:00","dateModified":"2026-04-06T04:59:24+00:00","author":{"@id":"https:\/\/codingindialab.com\/blog\/#\/schema\/person\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce"},"description":"The Word Counter is a web app that counts words and characters in a textarea field using HTML, CSS, and JavaScript.","breadcrumb":{"@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#primaryimage","url":"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1","contentUrl":"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1","width":1024,"height":566,"caption":"How to create Word and Character Counter using HTML CSS and JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/codingindialab.com\/blog\/how-to-create-word-and-character-counter-using-html-css-and-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codingindialab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create Word Counter using HTML CSS and JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/codingindialab.com\/blog\/#website","url":"https:\/\/codingindialab.com\/blog\/","name":"Coding India","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codingindialab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/codingindialab.com\/blog\/#\/schema\/person\/94a2d1f0e37a9a178ed9cd0a3aa7f3ce","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd5a9365f6d133d34466f8b64e07682be41ad59e15e64b8bda642df41823202e?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/codingindialab.com\/blog"],"url":"https:\/\/codingindialab.com\/blog\/author\/admin\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/codingindialab.com\/blog\/wp-content\/uploads\/2024\/07\/image-25-1024x566-1.webp?fit=1024%2C566&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":2,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/posts\/147\/revisions\/300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/media\/216"}],"wp:attachment":[{"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/media?parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/categories?post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingindialab.com\/blog\/wp-json\/wp\/v2\/tags?post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}