making table and divide section

 html file

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Welcome</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="padded3">
    <div class="container">
        <div class="left">
           
    <div class="padded">
        <img src="hack.jpg" width="150", height="150"></img>
        <p>Name : Deep </p>
        <p>DOB : 11 feb, 1947</p>

    </div>
    </div>
   
        <div class="right">
        <div class="padded2">    
    <h2>Education Qualification</h2>
    <table>
        <thead>
            <tr>
                <th>S.No </th>
                <th>Exam Passed</th>
                <th>Passing Year</th>
                <th>Marks Obtain</th>
                <th>Total Marks</th>
                <th>Percentage%</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>10th</td>
                <td>2021</td>
                <td>478</td>
                <td>500</td>
                <td>95.6</td>
            </tr>
            <tr>
                <td>2</td>
                <td>12th</td>
                <td>2024</td>
                <td>348</td>
                <td>500</td>
                <td>69.2</td>
            </tr>
        </tbody>
    </table>
        </div>
        </div>
     
    </div>
    </div>
</body>
</html>



css file

.padded {
    padding-left: 10%;
}

.padded2 {
    padding-right: 10%;
}

.padded3 {
    padding-top: 10%;
}


table {
    width: 50%;
    border-collapse: collapse; /* Combines borders */
}
th, td {
    border: 1px solid #ccc; /* Border for table cells */
    padding: 8px; /* Space inside cells */
    text-align: left; /* Aligns text to the left */
}
th {
    background-color: #f2f2f2; /* Light gray background for headers */
}

.container {
    display: flex;
}
.left, .right {
    flex: 1; /* Equal width for both parts */
    padding: 20px;
    box-sizing: border-box; /* Include padding in width */
}
.left {
    background-color: #f2f2f2; /* Light gray for left part */
}
.right {
    background-color: #f2f2f2; /* Light blue for right part */
}

Comments

Popular posts from this blog

Become Healthy Goal - Python Program

Interpretation vs Compilation

Calculator in C++