Web T 001
Web T 001
Web T 001
2100290120176
ASSIGNMENT 01
WEB TECHNOLOGY
1. Create a web page which will have one table and 2 paragraphs. Create
different styles for the table cells and paragraph. Maintain a separate style
sheet file for table whereas the styles for paragraph should be maintained
in the same file.
HTML CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Styled Table and Paragraphs</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Styled Table and Paragraphs</h1>
CSS CODE:
/* Styles for the table */
.styled-table {
width: 100%;
border-collapse: collapse;
border: 2px solid #ddd;
}
.styled-table th, .styled-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
.styled-table th {
background-color: #f2f2f2;
}
/* Styles for paragraphs */
.paragraph1 {
color: blue;
font-size: 18px;
font-weight: bold;
}
.paragraph2 {
color: green;
font-size: 16px;
font-style: italic;
}
2. Create the following HTML page. Use HTML code to print the symbols.
HTML CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Special Symbols</title>
</head>
<body>
<p>quotation mark: "</p>
<p>amperand sign: &</p>
<p>less than sign: <</p>
<p>greater than sign: ></p>
<p>copyright symbol: ©</p>
<p>registered symbol: ®</p>
<p>a blank space (non-breaking one space): </p>
</body>
</html>
3. Create a web page to print the following table:
HTML CODE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Course-wise Subjects</title>
<style>
table {
width: 100%;
border-collapse: collapse;
background-color: rgb(55, 194, 222);
}
th, td {
border: 1px solid #200ac7;
padding: 8px;
text-align: left;
}
</style>
</head>
<body>
<h2>Course-wise Subjects</h2>
<table>
<thead>
<tr>
<th>Sr. No.</th>
<th>Course</th>
<th>Subjects</th>
<th>Marks
<table>
<tr>
<td>Internal</td>
<td>External</td>
</tr>
</table>
</th>
<th>Category
<table>
<tr>
<td>Internal</td>
<td>External</td>
</tr>
</table>
</th>
<th>Practical/Theory</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">1</td>
<td rowspan="4">MBA</td>
<td>Management Accounting</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>Theory</td>
</tr>
<tr>
<td>Information Technology</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>T and P</td>
</tr>
<tr>
<td>Basics of Marketing</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>Theory</td>
</tr>
<tr>
<td>E-commerce</td>
<td>
<table>
<tr>
<td>50</td>
<td>-</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>✔</td>
<td>-</td>
</tr>
</table>
</td>
<td>Theory</td>
</tr>
<tr>
<td rowspan="6">2</td>
<td rowspan="6">MCM</td>
<td>Visual Basic</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>T and P</td>
</tr>
<tr>
<td>Internet Technology</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>T and P</td>
</tr>
<tr>
<td>Network Technology</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>Theory</td>
</tr>
<tr>
<td>VB. Net</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>T and P</td>
</tr>
<tr>
<td>Linux</td>
<td>
<table>
<tr>
<td>30</td>
<td>70</td>
</tr>
</table>
</td>
<td>
<table
<tr>
<td>-</td>
<td>✔</td>
</tr>
</table>
</td>
<td>T and P</td>
</tr>
<tr>
<td>ISA</td>
<td>
<table>
<tr>
<td>50</td>
<td>-</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>✔</td>
<td>-</td>
</tr>
</table>
</td>
<td>Theory</td>
</tr>
<tr>
</tbody>
</table>
</body>
</html>
4. Write a Java program to create a method that takes an integer as a parameter and
throws an exception if the number is odd.
CODE:
5. Write a Java program to create a method that takes a string as input and throws
an exception if the string does not contain vowels.
CODE:
public class NoVowelsException extends Exception {
public NoVowelsException(String message) {
super(message);
}
}
6. Write a Java program that reads a list of integers from the user and throws an exception
if any numbers are duplicates.
CODE:
import java.util.*;
7. Write a Java program to create a class called Vehicle with a method called drive(). Create
a subclass called Car that overrides the drive() method to print "Repairing a car".
CODE:
class Vehicle {
public void drive() {
System.out.println("Driving vehicle");
}
}
8. Write a Java program to create a class called Shape with a method called
getArea(). Create a subclass called Rectangle that overrides the getArea() method
to calculate the area of a rectangle.
CODE:
class Shape {
public double getArea() {
return 0.0;
}
}
XML is case-sensitive.
Every XML document must have a root element.
XML elements must be properly nested.
Attribute values must be quoted.
Comments are enclosed in <!-- -->.
XML tags cannot contain spaces.
Special characters like <, >, &, ', and " must be escaped using entities (<, >, &,
', ").