You are on page 1of 11

HTML

Assignment 2
Question 1:
<!-- Design a webpage to illustrate text font tag. -->

Ans :-
<html>
<head>
<title>Font tag illustration</title>
</head>

<body>
<u> <h1 style="text-align:center">Font tag</h1> </u>
<font size="7">This text's size is 7.</font><br>
<font face="Verdana">This text's font is
Verdana.</font><br>
<font color="red">This text's colour is Red.</font>
</body>
</html>

Output :-
Question 2:
<!-- Design a page using img tag with its Properties. -->

Ans :-
<html>
<head>
<title>IMG tag</title>
</head>

<body style="text-align:center">
<u><h1>IMG tag with its porperties</h1></u>
<img src="image.jfif" alt="A man looking towards
mountain" width="400px">
</body>
</html>

Output :-
Question 3:
<!-- Design a page to display the information in table format.
Insert 10 students’ records. -->

Ans :-
<html>
<head>
<title>Table tag</title>
</head>

<body style="text-align:center">
<u> <h1>Records of 10 Students</h1> </u>
<table border="2" width="50%" align="center">
<tr>
<th>Roll No.</th>
<th>Name</th>
<th>Marks</th>
</tr>

<tr>
<td>1.</td>
<td>Pawan</td>
<td>80</td>
</tr>

<tr>
<td>2.</td>
<td>Shubham</td>
<td>89</td>
</tr>

<tr>
<td>3.</td>
<td>Suraj</td>
<td>98</td>
</tr>

<tr>
<td>4.</td>
<td>Amit</td>
<td>75</td>
</tr>

<tr>
<td>5.</td>
<td>Rohan</td>
<td>87</td>
</tr>

<tr>
<td>6.</td>
<td>Ramesh</td>
<td>69</td>
</tr>

<tr>
<td>7.</td>
<td>Sohan</td>
<td>82</td>
</tr>

<tr>
<td>8.</td>
<td>Tarun</td>
<td>67</td>
</tr>

<tr>
<td>9.</td>
<td>Mohan</td>
<td>99</td>
</tr>

<tr>
<td>10.</td>
<td>Ravi</td>
<td>56</td>
</tr>
</table>
</body>
</html>

Output :-
Question 4:
<!-- Design an html page using cell spacing -->

Ans :-
<html>
<head>
<title>Table with Cell Spacing</title>
</head>

<body style="text-align:center">
<u><h1>Table tag with its cellspacing
porperty</h1></u>
<table border="1" width="50%" cellspacing="10"
align="center">
<tr>
<th>Numbers</th>
<th>Squares</th>
</tr>

<tr>
<td>1</td>
<td>1</td>
</tr>

<tr>
<td>2</td>
<td>4</td>
</tr>

<tr>
<td>3</td>
<td>9</td>
</tr>

<tr>
<td>4</td>
<td>16</td>
</tr>

<tr>
<td>5</td>
<td>25</td>
</tr>
</table>
</body>
</html>

Output :-
Question 5:
<!-- img and cellpadding property of table tag -->

Ans :-
<html>
<head>
<title>IMG and Cellpadding on table</title>
</head>

<body>
<u> <h1 style="text-align:center">Shapes and their
Names</h1> </u>
<table border="1" cellpadding="10" width="50%"
align="center">
<tr>
<td>Shapes</td>
<td>Name</td>
</tr>

<tr>
<td> <img src="square.png" alt="image of
square" width="100px"></td>
<td>Square</td>
</tr>

<tr>
<td> <img src="circle.png" alt="image of circle"
width="100px"></td>
<td>Circle</td>
</tr>

<tr>
<td> <img src="rectangle.png" alt="image
of rectangle" width="100px"></td>
<td>Rectangle</td>
</tr>
</table>
</body>
</html>

Output :-
Question 5:
<!-- Create a webpage to containing brief description about
your college using links. -->

Ans :-
<html>
<head>
<title>
Karim City college
</title>
</head>

<body>
<u> <h1 style="text-align:center">Karim City
College</h1> </u>
<a href="q1.html">About</a> <br>
<a href="q2.html">Contact Us</a><br>
<a href="q3.html">Careers</a><br>
<a href="q4.html">Apply for New Course</a><br>

<p>Karim City College (KCC), Jamshedpur, affiliated to


Kolhan University came into existence in 1961. This college was
established to basically impart knowledge to the weaker
section of Jharkhand. KCC is a private college which offers 31
undergraduate and postgraduate courses in 22 departments
across 3 streams namely arts, commerce & science. KCC also
provides certificates & diplomas under add-on vocational
courses with different specialisations.</p>
</body>
</html>

Output :-

You might also like