How to create a dynamic report card using HTML, CSS and JavaScript ? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 5 Likes Like Report We have to build a website where you can upload your student data like their name and marks in different subjects. And after uploading it will insert the student data in the table as well as, it will show the total marks, average, and pass/fail status. The implementation is done by using HTML and JavaScript.Approach:At first, we have to create some rows and columns for name and subject scores. Again subject scores will be further divided into four columns. There are four subject names that will be displayed. Users are allowed to enter the details with a click button to "Add To Table".There will be another table Student Data with four columns Name, Total, Average, Pass Or Fail.For every entered data, one row will add to the score table, showing the student's total score, average and pass or fail status. If the average score is greater than 70 then the status is "pass" otherwise the status is "fail".If we enter other data it will store in the table.Example: This example describes the above-explained approach. HTML <!DOCTYPE html> <html> <body bgcolor="lightblue"> <center> <table border="1" cellspacing="5" bgcolor="white"> <caption><b>Input Marks</b></caption> <tr> <th rowspan="2">Name</th> <th colspan="4">Score</th> </tr> <tr> <th>Hindi</th> <th>English</th> <th>Math</th> <th>C Programming</th> </tr> <tr> <td><input type="text" id="aname"></td> <td><input type="text" id="am"></td> <td><input type="text" id="aj"></td> <td><input type="text" id="ad"></td> <td><input type="text" id="an"></td> </tr> <tr> <th colspan="5" height="30"> <input type="submit" value="Add To Table" onclick="Sub()"></th> </tr> </table> <br> <table border="1" cellspacing="5" bgcolor="white" height="100" width="500" cellpadding="5" id="TableScore"> <caption><b>Student Data</b></caption> <tr> <th width="180">Name</th> <th>Total</th> <th>Average</th> <th>Pass Or Fail</th> </tr> </table> </center> <script type="text/javascript"> function Sub(){ let n, k, r, e, v, sum, avg; n=(document.getElementById('aname').value); k=parseFloat(document.getElementById('am').value); r=parseFloat(document.getElementById('aj').value); e=parseFloat(document.getElementById('ad').value); v=parseFloat(document.getElementById('an').value); // Calculating Total sum=k+r+e+v; avg=sum/4; // Display on Student Data let newTable = document.getElementById('TableScore'); let row = newTable.insertRow(-1); let cell1 = row.insertCell(0); let cell2 = row.insertCell(0); let cell3 = row.insertCell(0); let cell4 = row.insertCell(0); cell4.innerHTML= n; cell3.innerHTML=sum; cell2.innerHTML = avg; if(avg>=70){ cell1.innerHTML="<font color=green>Pass</font>"; }else{ cell1.innerHTML="<font color=red>Fail</font>"; } } </script> </body> </html> Output: Create Quiz How to create a dynamic report card using HTML, CSS and JavaScript ? Comment S sounetraghosal2000 Follow 5 Improve S sounetraghosal2000 Follow 5 Improve Article Tags : JavaScript Web Technologies JavaScript-Projects Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)8 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like