How To Make Editable Table

Hello developers today we will learn how to edit table.

It’s possible without any need of third party plugin so let see it.

  • index.html
<!DOCTYPE html>
<html lang="en">
    <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="./styles.css"/>
    <link href="" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <script src="" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
    <table class="table table-striped table-bordered w-50">
            <th>Mobile Number</th>
            <td><div contenteditable="true">Darshan</div></td>
            <td><div contenteditable="true"></div></td>
            <td><div contenteditable="true">9999999999</div></td>
            <td><div contenteditable="true">Hardik</div></td>
            <td><div contenteditable="true"></div></td>
            <td><div contenteditable="true">9999999999</div></td>
            <td><div contenteditable="true">Hit</div></td>
            <td><div contenteditable="true"></div></td>
            <td><div contenteditable="true">9999999999</div></td>
  • styles.css
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
contenteditable” can accept two values true & false
Here is Demo of editable table
Hope you found this blog helpful. Reach out in comment section if you have any doubt.

Submit a Comment

Your email address will not be published. Required fields are marked *


Select Categories