WT Lab File
WT Lab File
<head>
<title>Table Example</title>
<style type="text/css">
table {
width: 500px;
padding: 10px;
cellpadding: 5px;
cellspacing: 10px;
th {
background-color: #ccc;
font-weight: bold;
td {
text-align: center;
</style>
</head>
<body>
<table>
<tr>
<th colspan="2">Product</th>
<th>Price</th>
</tr>
<tr>
<td rowspan="2">Computer</td>
<td>Laptop</td>
<td>$1,000</td>
</tr>
<tr>
<td>Desktop</td>
<td>$500</td>
</tr>
<tr>
<th width="50">Category</th>
<td colspan="2">Electronics</td>
</tr>
</table>
</body>
</html>
OUTPUT:
Q-4
CODE:
FRAMESET.HTML
<html>
<head>
<title>Frameset Example</title>
</head>
</frameset>
</frameset>
</html>
EXPLANATION_LIST.HTML
<html>
<head>
<title>List Explanation</title>
</head>
<body>
<dl>
<dt>LIST</dt>
In unordered lists, list items are usually displayed using bullet points. In ordered
lists, they are usually displayed with an ascending counter on the left, such as a
number or letter.</dd>
</dl>
<ul>
<li><a href="example_list.html" target="bottomRightFrame">Example</a></li>
</ul>
</body>
</html>
EXPLANATION_TABLE.HTML
<html>
<head>
<title>Table Explanation</title>
</head>
<body>
<dl>
<dt>TABLE</dt>
<dd><html>
<head>
<title>List Explanation</title>
</head>
<body>
<dl>
<dt>LIST</dt>
<dd><html>
<head>
<title>List Explanation</title>
</head>
<body>
<dl>
<dt>LIST</dt>
<dd>In HTML, the table element is used to create structured tabular data. A table
consists of rows and columns, with each cell containing data. Tables are commonly used
to organize and display data in a grid-like format</dd>
</dl>
<ul>
</li>
</ul>
</body>
</html>
EXPLANATION_FRAME.HTML
<html>
<head>
<title>Frame Explanation</title>
</head>
<body>
<dl>
<dt>FRAME</dt>
<dd>In HTML, the term "frame" typically refers to a feature known as "frames" or
"HTML framesets." Frames were a way to divide a web page into multiple independent
sections or frames, each with its own content. Frames were commonly used in the early
days of the web for creating multi-pane layouts, such as split-screen views or
navigation menus that remained constant while other content changed.</dd>
</dl>
<ul>
</ul>
</body>
</html>
EXAMPLE_LIST.HTML
<html>
<head>
<title>List Examples</title>
</head>
<body>
<h1>HTML Lists</h1>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>
<dl>
<dt>Term 1</dt>
<dd>Definition 1</dd>
<dt>Term 2</dt>
<dd>Definition 2</dd>
<dt>Term 3</dt>
<dd>Definition 3</dd>
</dl>
</body>
</html>
EXAMPLE_TABLE.HTML
<html>
<head>
<title>Table Example</title>
</head>
<body>
<table border="1">
<caption>Monthly Expenses</caption>
<tr>
<th>Category</th>
<th>Amount (USD)</th>
</tr>
<tr>
<td>Rent</td>
<td>1000</td>
</tr>
<tr>
<td>Utilities</td>
<td>200</td>
</tr>
<tr>
<td>Groceries</td>
<td>300</td>
</tr>
</table>
</body>
</html>
EXAMPLE_FRAME.HTML
<html>
<head>
<title>Frame Example</title>
</head>
<frame src="">
<frame src="">
</frameset>
</html>
OUTPUT:
Q19) Write a Program to show the usage of alert box and confirm box.
Input(Code):-
<html>
<head>
<script>
function myfunction()
</script>
</head>
<body>
</body>
</html>
Output:-
Q20) Write a program to implement event handling using onclick, onmouseover and
onmouseout events.
i)Onclick
Input(Code):-
<html>
<head>
<script type="text/javascript">
function sayHello(){
</script>
</head>
<body>
</body>
</html>
Output:-
Input(Code):-
<html>
<head>
<script type="text/javascript">
function f1() {
alert("Hello World")
</script></head>