Creating a student attendance portal involves a combination of HTML for the front-end and C# for the back-end. Here's a simplified example of HTML and C# code to get you started. This example uses ASP.NET for the server-side functionality. 1. HTML for the Front-End (index.html): ```html <!DOCTYPE html> <html> <head> <title>Student Attendance Portal</title> </head> <body> <h1>Welcome to the Student Attendance Portal</h1> <form action="SubmitAttendance.aspx" method="post"> <label for="studentName">Student Name:</label> <input type="text" id="studentName" name="studentName" required><br><br> <label for="date">Date:</label> <input type="date" id="date" name="date" required><br><br> <label for="status">Attendance Status:</label> <select id="status" name="status" required> <option value="Present">Present</option> <option value="Absent">Absent</option> </select><br><br> <input type="submit" value="Submit Attendance"> </form> </body> </html> ``` 2. C# Back-End (SubmitAttendance.aspx.cs): ```csharp using System; using System.Web.UI; public partial class SubmitAttendance : Page { protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { // Retrieve data from the form string studentName = Request.Form["studentName"]; string date = Request.Form["date"]; string status = Request.Form["status"]; // Perform database operations or store attendance data as needed // For this example, we'll just display the information Response.Write($"Attendance submitted for Student: {studentName}<br>"); Response.Write($"Date: {date}<br>"); Response.Write($"Status: {status}"); } } } ``` This is a simplified example to get you started. In a real-world scenario, you would typically connect to a database to store and retrieve attendance data securely. Additionally, you may want to implement user authentication and authorization to ensure that only authorized individuals can submit attendance. Make sure to set up your development environment with ASP.NET to run this code.
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.
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.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
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;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>