fsd2p
fsd2p
AIM:
To WriteaHTMLprogram,toexplaintheworkingoftables.(usetags:<table>,<tr>,<th>,
<td>andattributes:border,rowspan,colspan)
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Tables</title>
<style>
h1 {
text-align: center;
}
table {
width: 50%;
border-collapse: collapse;
margin: 20px auto;
}
th, td {
border: 1px solid #ccc;
padding: 10px;
text-align: center;
}
th {
background-color: #f4f4f4;
}
</style>
</head>
<body>
<h1>Working with Tables in HTML</h1>
<table border="1">
<tr>
<th>Name</th>
<th colspan="2">Subjects</th>
</tr>
<tr>
<td>Arjun</td>
<td>Math</td>
<td>Science</td>
</tr>
<tr>
<td rowspan="2">Ram</td>
<td>History</td>
<td>Geography</td>
</tr>
<tr>
<td>Math</td>
<td>Physics</td>
</tr>
</table>
</body>
</html>
Output:
Working with Tables in HTML
Name Subjects
History Geography
Ramu
Math Physics
RESULT:
Hence the HTMLprogram,toexplaintheworkingoftables.(usetags:<table>,<tr>,<th>,
<td>andattributes:border,rowspan,colspan)was executed successfully.
AIM:
Write a HTML program, to explain the working of tables by preparing a timetable. (Note:
Use <caption> tag to set the caption to the table & also use cell spacing, cell padding,
border, rowspan, colspan etc.).
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weekly Timetable</title>
<style>
table {
width: 80%;
border-collapse: collapse;
margin: 20px auto;
}
th, td {
border: 1px solid #333;
padding: 10px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
caption {
font-size: 1.5em;
margin: 10px;
}
</style>
</head>
<body>
<tr>
<th>Day</th>
<th colspan="2">Morning Session</th>
<th colspan="2">Afternoon Session</th>
</tr>
</thead>
<tbody>
<tr>
<td>Monday</td>
<td rowspan="2">OS</td>
<td>ES</td>
<td rowspan="2">DBMS</td>
<td>FSD</td>
</tr>
<tr>
<td>Tuesday</td>
<td>Java</td>
<td>Python</td>
</tr>
<tr>
<td>Wednesday</td>
<td>OS</td>
<td>ES</td>
<td>DBMS</td>
<td>FSD</td>
</tr>
<tr>
<td>Thursday</td>
<td>Java</td>
<td>Python</td>
<td>OS</td>
<td>ES</td>
</tr>
<tr>
<td>Friday</td>
<td>DBMS</td>
<td>FSD</td>
<td>Java</td>
<td>Python</td>
</tr>
<tr>
<td>Saturday</td>
<td colspan="2">Revision</td>
<td colspan="2">Project Work</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:
RESULT:
Hence the HTML program, to explain the working of tables by preparing a timetable.
(Note: Use <caption> tag to set the caption to the table & also use cell spacing, cell
padding, border, rowspan, colspan etc.)was executed successfully.
AIM:
Write a HTML program, to explain the working of forms by designing Registration form.
(Note: Include text field, password field, number field, date of birth field, checkboxes,
radio buttons, list boxes using <select>&<option> tags, <text area> and two buttons ie:
submit and reset. Use tables to provide a better view).
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Form</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
h1 {
text-align: center;
}
table {
width: 50%;
border-collapse: collapse;
margin: 20px auto;
}
th, td {
padding: 10px;
text-align: left;
}
th {
background-color: #f4f4f4;
}
input, select, textarea {
padding: 5px;
margin: 5px 0;
}
button {
padding: 10px 20px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Registration Form</h1>
</body>
</html>
OUTPUT:
RESULT:
Hence the HTML program, to explain the working of forms by designing Registration
form. (Note: Include text field, password field, number field, date of birth field,
checkboxes, radio buttons, list boxes using <select>&<option> tags, <text area> and two
buttons ie: submit and reset. Use tables to provide a better view)was executed
successfully.
AIM:
To Write a HTML program, to explain the working of frames, suchthat page is to be
divided into 3 parts oneither direction. (Note: first frameimage, second frameparagraph,
third frame ◻ hyperlink. And also make sure ofusing “no frame” attribute such that
frames to be fixed).
PROGRAM:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Frames Example</title>
</head>
<frameset cols="33%, 33%, 34%">
<frame src="image_frame.html" name="frame1">
<frame src="text_frame.html" name="frame2">
<frame src="link_frame.html" name="frame3">
<noframes>
<body>
Your browser does not support frames.
</body>
</noframes>
</frameset>
</html>
Image.html:
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Frame</title>
</head>
<body>
<h1>NATURE</h1>
<body>
<h3>Useful Links</h3>
<ul>
<li><a href="https://www.google.com" target="_blank">Google</a></li>
<li><a href="https://www.wikipedia.org" target="_blank">Wikipedia</a></li>
<li><a href="https://www.github.com" target="_blank">GitHub</a></li>
</ul>
</body>
</html>
Output:
RESULT:
Hence the program to explain the working of frames, suchthat page is to be divided into
3 parts oneither direction. (Note: first frameimage, second frameparagraph, third frame
◻ hyperlink. And also make sure ofusing “no frame” attribute such that frames to be
fixed) was executed successfully.