Internet Test 1 - Answers
1) Explain HTML Forms and Tables with example
Theory of HTML Forms:
HTML forms are used to collect user input. They consist of elements like text boxes, radio buttons, etc., and
are submitted to the server for processing.
Theory of HTML Tables:
HTML tables are used to display data in a structured tabular format using rows and columns.
Example:
<form action='[Link]' method='post'>
<label>Name:</label>
<input type='text' name='name'>
<input type='submit'>
</form>
<table border='1'>
<tr><th>Roll No</th><th>Name</th><th>Marks</th></tr>
<tr><td>101</td><td>Prathap</td><td>90</td></tr>
</table>
2) Develop a program for student mark sheet design using HTML and explain it
Theory:
A student mark sheet displays marks in various subjects, along with total and grade. HTML tables are used
for this design.
Example:
<!DOCTYPE html>
<html>
<head><title>Student Mark Sheet</title></head>
<body>
Internet Test 1 - Answers
<h1 align='center'>Student Mark Sheet</h1>
<table border='1' align='center' cellpadding='10'>
<tr><th>Roll
No</th><th>Name</th><th>Maths</th><th>Science</th><th>English</th><th>Total</th><th>Grade</th></tr
>
<tr><td>101</td><td>Prathap</td><td>90</td><td>88</td><td>92</td><td>270</td><td>A+</td></tr>
</table>
</body>
</html>
3) Explain the following:
i) Style Rule Cascading and Inheritance
ii) Text Properties
i) Cascading and Inheritance:
Cascading determines which CSS rule applies when multiple rules affect the same element.
Priority: Inline > Internal > External. Inheritance allows properties like color and font to pass from parent to
child.
ii) Text Properties:
- color: Sets text color (e.g., color: red;)
- font-size: Sets size (e.g., font-size: 16px;)
- text-align: Aligns text (e.g., center)
- font-family: Sets font type
- text-decoration: Underline, overline, etc.
4) Discuss in detail about backgrounds in CSS
Theory:
CSS background properties allow us to set background colors and images. Useful for improving page
aesthetics.
Internet Test 1 - Answers
Common Properties:
- background-color
- background-image
- background-repeat
- background-position
- background-size
- background-attachment
Example:
body {
background-color: lightblue;
background-image: url('[Link]');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-attachment: fixed;