HTML Practical Answers
1. Create a static webpage using table tags of HTML.
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Example</title>
</head>
<body>
<h2>Student Details</h2>
<table border="1" cellpadding="10">
<tr>
<th>Roll No</th>
<th>Name</th>
<th>Branch</th>
</tr>
<tr>
<td>101</td>
<td>Rahul</td>
<td>CSE</td>
</tr>
<tr>
<td>102</td>
<td>Priya</td>
<td>IT</td>
</tr>
</table>
</body>
</html>
2. Create a static web page which defines all text formatting tags of HTML in
tabular format.
<!DOCTYPE html>
<html>
<head>
<title>Formatting Tags</title>
</head>
<body>
<h2>HTML Formatting Tags</h2>
<table border="1" cellpadding="10">
<tr>
<th>Tag</th>
<th>Output</th>
</tr>
<tr>
<td><b></td>
<td><b>Bold Text</b></td>
</tr>
<tr>
<td><i></td>
<td><i>Italic Text</i></td>
</tr>
<tr>
<td><u></td>
<td><u>Underline Text</u></td>
</tr>
<tr>
<td><mark></td>
<td><mark>Highlighted Text</mark></td>
</tr>
<tr>
<td><small></td>
<td><small>Small Text</small></td>
</tr>
</table>
</body>
</html>
3. Create a webpage using list tags of HTML.
<!DOCTYPE html>
<html>
<head>
<title>List Tags</title>
</head>
<body>
<h2>Ordered List</h2>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ol>
<h2>Unordered List</h2>
<ul>
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ul>
</body>
</html>
4. Create webpage to include image using HTML tag.
<!DOCTYPE html>
<html>
<head>
<title>Image Example</title>
</head>
<body>
<h2>Adding Image in HTML</h2>
<img src="[Link]" alt="Nature Image" width="400"
height="250">
</body>
</html>
5. Create an HTML file that contains heading, paragraphs, unordered list and
image.
<!DOCTYPE html>
<html>
<head>
<title>First Page</title>
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is the first paragraph of the webpage.</p>
<p>This is the second paragraph of the webpage.</p>
<h2>Unordered List</h2>
<ul>
<li>Computer</li>
<li>Keyboard</li>
<li>Mouse</li>
</ul>
<h2>Image Example</h2>
<img src="[Link]" alt="Sample Image" width="300">
</body>
</html>