---
title: "Discussion on \"Creating a Kanban Board with HTML, CSS & JavaScript\" | Hashnode"
description: "Discussion on \"Creating a Kanban Board with HTML, CSS & JavaScript\". Modern UX designs and functionality can also be achieved with much simpler elements of HTML, CSS & JavaScript."
url: "https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Creating a Kanban Board with HTML, CSS & JavaScript](https://karthikdevarticles.com/creating-a-kanban-board-with-html-css-and-javascript?utm_source=hashnode&utm_medium=feed)

Modern UX designs and functionality can also be achieved with much simpler elements of HTML, CSS & JavaScript.

Jun 13, 2021 · 5 min read · karthikdevarticles.com  
Updated Apr 25, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#html](https://hashnode.com/tag/html)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#css](https://hashnode.com/tag/css)

## Written by

[Karthik](https://hashnode.com/@karthikdevarticles)

@karthikdevarticles

  
[View profile](https://hashnode.com/@karthikdevarticles)

Full Stack Developer | Blogger | UX Design

## Responses 4

Markdown supported · ⌘↵ to post

[Simone Gentili](https://hashnode.com/@sensorario)

[Apr 12, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/6254f295b32ddd968bbea7af)

Avoid putting task into each others simply adding `.closest('.skanban-block')`:

```
function drop(ev) {
    ev.preventDefault();
    var data = ev.dataTransfer.getData("text");
    ev.target
      .closest('.skanban-block')
      .appendChild(document.getElementById(data));
}
```

Another nice feature is to move a task between two to sort tasks.

[M Sreeja](https://hashnode.com/@sreeja22)

[Mar 22, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/6239a2f76622115cc8049905)

Share the functionality which helps to count the no of tasks dynamically

[Nikhil](https://hashnode.com/@nikhilshahu)

[May 7, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/6239a2f76622115cc8049905#reply-6275f1b8317fc95a74ca702a)

Hi, did you find a way to do that?

[vamsi krishna hanumalasetty](https://hashnode.com/@Vamsikrishna45)

[Oct 21, 2021](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/61716edd0c5e175a1c612d65)

Hi, I wanted to add some other functionality like showing the number of task cards present in each stage dynamically after changing thier positions. Can you help me with easiest way to do that? I loved the way you explained.

[Nikhil](https://hashnode.com/@nikhilshahu)

[May 7, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/61716edd0c5e175a1c612d65#reply-62760549317fc95a74ca729f)

I tried many things but did get any solution. can u send me the one you have created? [vamsi krishna hanumalasetty](https://hashnode.com/@Vamsikrishna45)

[vamsi krishna hanumalasetty](https://hashnode.com/@Vamsikrishna45)

[May 7, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/61716edd0c5e175a1c612d65#reply-62761860317fc95a74ca74ef)

[Nikhil](https://hashnode.com/@nikhilshahu) I wrote a function for counting child elements inside a div and displays the count value in html. I think there is a property in js to find number of child nodes for a particular node.

Everytime we drag a card from one div and drop in another div , while the drop event occurs that function get's triggered.

This is how i've done that.

I forgot to add those files in github nikhil 🤦. I lost those files 😐.

[Nikhil](https://hashnode.com/@nikhilshahu)

[May 8, 2022](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/61716edd0c5e175a1c612d65#reply-6277ace0317fc95a74ca9c36)

ok thanks. This what I needed. [vamsi krishna hanumalasetty](https://hashnode.com/@Vamsikrishna45)

[B. Uday Kiran](https://hashnode.com/@uday88)

[Jul 12, 2021](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/60eba1c5c551f16b0f84fb79)

I found the solution in the stackover flow for that issue. [stackoverflow.com/questions/28203585/prevent-drop…](https://stackoverflow.com/questions/28203585/prevent-drop-inside-a-child-element-when-drag-dropping-with-js)

It worked for me.

[Karthik](https://hashnode.com/@karthikdevarticles)

[Jul 12, 2021](https://hashnode.com/posts/creating-a-kanban-board-with-html-css-and-javascript/60c5ba2d1679ed6f51a27987/comment/60eba1c5c551f16b0f84fb79#reply-60ec622a573c235ee639cf63)

Thanks for the solution Uday Kiran, yes it worked for me as well.

And I had also received another solution from a user on the same post here - [dev.to/karthikdevarticles/creating-a-kanban-board…](https://dev.to/karthikdevarticles/creating-a-kanban-board-with-html-css-javascript-13id)

Do check that out.
