Certainly! Here's an HTML template with JavaScript that meets your requirements. This example includes a form with a dropdown for selecting the class and an input for entering the roll number. The result is displayed in a table with the specified background and text colors, and GPA is calculated based on the specified rules.

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>School Result</title>
    <script>
        function showResult() {
            // Get selected options
            var selectedClass = document.getElementById("classSelect").value;
            var selectedRoll = document.getElementById("rollInput").value;

            // Fetch the student result data from the server (simulated data for the example)
            // Replace this with actual server-side code in a real-world scenario
            var resultData = fetchResultData(selectedClass, selectedRoll);

            // Display result in a table
            if (resultData) {
                var resultTable = "<table border='1' style='background-color: pink;'>";
                resultTable += "<caption style='color: green;'>Name: " + resultData.name + "</caption>";
                resultTable += "<tr><th>Subject</th><th>Marks</th><th>Total</th></tr>";

                var totalPoints = 0;

                for (var subject in resultData.subjects) {
                    var marks = resultData.subjects[subject];
                    totalPoints += marks;

                    resultTable += "<tr><td style='color: green;'>" + subject + "</td><td>" + marks + " of 100</td><td>100</td></tr>";
                }

                resultTable += "</table>";

                // Calculate GPA based on average points
                var gpa = calculateGPA(totalPoints / Object.keys(resultData.subjects).length);

                resultTable += "<p style='background-color: red; color: white;'>GPA: " + gpa + "</p>";

                document.getElementById("result").innerHTML = resultTable;
            } else {
                document.getElementById("result").innerHTML = "Student not found";
            }
        }

        function calculateGPA(averagePoints) {
            if (averagePoints >= 80) {
                return 5; // A+
            } else if (averagePoints >= 71) {
                return 4; // A
            } else if (averagePoints >= 61) {
                return 3.5; // A-
            } else if (averagePoints >= 51) {
                return 3; // B
            } else if (averagePoints >= 41) {
                return 2; // C
            } else if (averagePoints >= 33) {
                return 1; // D
            } else {
                return 0; // F
            }
        }

        // Simulated function to fetch result data from the server
        function fetchResultData(selectedClass, selectedRoll) {
            // This is a simplified example. In a real-world scenario, you'd fetch data from the server.
            var students = [
                {
                    class: 11,
                    roll: 1,
                    name: "Tirtha",
                    examResults: {
                        Bangla: 65,
                        English: 95,
                        Accounting: 89,
                        Ict: 94,
                        Management: 86,
                        Finans: 49,
                        Economic: 67
                    }
                },
                {
                    class: 11,
                    roll: 74,
                    name: "Fahim Uddin",
                    examResults: {
                        Bangla: 70,
                        English: 45,
                        Accounting: 9,
                        Ict: 84,
                        Management: 66,
                        Finans: 88,
                        Economic: 87
                    }
                }
            ];

            // Find the student based on input criteria
            var selectedStudent = students.find(student => student.class == selectedClass &&
                student.roll == selectedRoll);

            if (selectedStudent) {
                // Return the result data
                return {
                    name: selectedStudent.name,
                    subjects: selectedStudent.examResults
                };
            } else {
                // Return null if student not found
                return null;
            }
        }
    </script>
</head>
<body>
    <h1>School Result</h1>
    <label for="classSelect">Select Class:</label>
    <select id="classSelect">
        <option value="11">Class 11</option>
        <!-- Add more classes as needed -->
    </select>

    <br>

    <label for="rollInput">Enter Roll Number:</label>
    <input type="number" id="rollInput" min="1">

    <br>

    <button onclick="showResult()">Show Result</button>

    <br>

    <div id="result"></div>
</body>
</html>
```

This example allows you to select the class and enter the roll number, and then it displays the result in a table with the specified colors, including the calculated GPA. 

HTML Online Editor & Compiler

Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML. You can also specify the stylesheet information in styles.css tab and scripts information in scripts.js tab and start coding.

About HTML

HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.

Syntax help

Fundamentals

  • Any HTML document must start with document declaration <!DOCTYPE html>
  • HTML documents begin with <html> and ends with </html>
  • Headings are defined with <h1> to <h6> where <h1> is the highest important heading and <h6> is the least important sub-heading.
  • Paragrahs are defined in <p>..</p> tag.
  • Links are defined in <a> tag.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    
  • Images are defined in <img> tag, where src attribute consists of image name.
  • Buttons are defined in <button>..</button> tag
  • Lists are defined in <ul> for unordered/bullet list and <ol> for ordered/number list, and the list items are defined in <li>.

HTML Elements and Attributes

  • HTML element is everything present from start tag to end tag.
  • The text present between start and end tag is called HTML element content.
  • Anything can be a tagname but it's preferred to put the meaningful title to the content present as tag name.
  • Do not forget the end tag.
  • Elements with no content are called empty elements.
  • Elements can have attributes which provides additional information about the element.
  • In the below example, href is an attribute and a is the tag name.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    

CSS

CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.

Example:

Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.

body{
  padding: 25px;
}
.title {
	color: #228B22;
	font-family: Candara;
}

HTML Tables

  • HTML Tables are defined in <table> tag.
  • Table row should be defined in <tr> tag
  • Table header should be defined in <th> tag
  • Table data should be defined in <td> tag
  • Table caption should be defined in <caption> tag

HTML-Javascript

  • Javascript is used in HTML pages to make them more interactive.
  • <script> is the tag used to write scripts in HTML
  • You can either reference a external script or write script code in this tag.

Example

<script src="script.js"></script>