Assignment 11 Iwt
Assignment 11 Iwt
1. Write a CSS rule that makes all text 2 times larger than the base font of the system
<html>
<head>
<title>Document</title>
</head>
<body>
</body>
</html>
OUTPUT:-
2. Write a CSS rules that gives all h1 and h2 elements a padding of 0.5 ems, a dashed
<html>
<head>
<title>Document</title>
<style>
h1,h2{
margin: 0.5em;
padding: 0.5em;
border: 1px dashed black;
}
</style>
</head>
<body>
<h1>This is heading one</h1>
<h2>This is heading two</h2>
</body>
</html>
OUTPUT:-
3. Write a CSS rule that places a background image halfway down the page, tiling it
horizontally. The image should remain in place when the user scrolls up or down.
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<style>
body{
background-attachment: fixed;
background-size: 100% 50%;
background-repeat: no-repeat;
}
</style>
</head>
<body style="background-image: url(Clouds-Meet-The-Sea-AI-Generated-4K-
Wallpaper.jpg)">
</body>
</html>
OUTPUT:-
4. Create a table having a single border around the table, width 100%, height of the
headings as 50px.
<html>
<head>
<title>Document</title>
<style>
table{
border: 1px solid black;
width: 100%;
}
th{
height: 50px;
}
td{
text-align: center;
}
</style>
</head>
<body>
<table>
<tr>
<th>Sl. No.</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
<tr>
<td>1</td>
<td>Dibyajyoti</td>
<td>Mohanty</td>
</tr>
<tr>
<td>2</td>
<td>Monkey D.</td>
<td>Luffy</td>
</tr>
<tr>
<td>3</td>
<td>Naruto</td>
<td>Uzumaki</td>
</tr>
</table>
</body>
</html>
OUTPUT:-
5. Design an unordered list with image as list item marker.
<html>
<head>
<title>Document</title>
</head>
<body>
<ul>
<li><img src="https://cuchiwaii.com/cdn/shop/products/image_032fe646-
7d5f-468e-9528-a3b5d0e25b04.heic?v=1678292450" alt="" height="200px"
width="100px">Monkey D. Luffy</li>
<li><img
src="https://i.pinimg.com/736x/5f/27/38/5f273896f33967120ce661010c763192.jpg"
alt="" height="200px" width="100px">Naruto Uzumaki</li>
<li><img
src="https://i.pinimg.com/originals/f2/48/4c/f2484c8ed26ee10ed603bf26c7c86669.
jpg" alt="" height="200px" width="100px">Gojo Satoru</li>
<li><img
src="https://images.tokopedia.net/img/cache/700/VqbcmM/2021/1/27/3e016173-
aac2-4617-ba66-d5eaf995d460.jpg" alt="" height="200px" width="100px">Eren
Yeager</li>
</ul>
</body>
</html>
OUTPUT:-
6. Design an unordered list and an ordered list and set the background color for each list.
<html>
<head>
<title>Document</title>
</head>
<body>
<ul>
<li style="background-color: aqua;"></li>
<li style="background-color: violet;"></li>
<li style="background-color: white;"></li>
<li style="background-color: orangered;"></li>
</ul>
<ol>
<li style="background-color: orange;"></li>
<li style="background-color: BLACK;"></li>
<li style="background-color: green;"></li>
<li style="background-color: yellow;"></li>
</ol>
</body>
</html>
OUTPUT:-
7. Set the size of the font for 3 different paragraphs using em, px and percent
Respectively.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p style="font-size: 2em; color: darkred;">It is a long established fact that
a reader will be
distracted by the readable content of a page when looking at its layout. The
point of using Lorem
Ipsum is that it has a more-or-less normal distribution of letters, as opposed
to using 'Content
here, content here', making it look like readable English. Many desktop
publishing packages and
web page editors now use Lorem Ipsum as their default model text, and a search
for 'lorem ipsum'
will uncover many web sites still in their infancy. Various versions have
evolved over the years,
sometimes by accident, sometimes on purpose (injected humour and the like.</p>
<p style="font-size:50px;color:blue;">It is a long established fact that a
reader will be distracted by
the readable content of a page when looking at its layout. The point of using
Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as opposed to using
'Content here, content here',
making it look like readable English. Many desktop publishing packages and web
page editors now
use Lorem Ipsum as their default model text, and a search for 'lorem ipsum'
will uncover many
web sites still in their infancy. Various versions have evolved over the
years, sometimes by
accident, sometimes on purpose (injected humour and the like.
</p>
<p style="font-size:150%;color:red;">It is a long established fact that a
reader will be distracted by
the readable content of a page when looking at its layout. The point of using
Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as opposed to using
'Content here, content here',
making it look like readable English. Many desktop publishing packages and web
page editors now
use Lorem Ipsum as their default model text, and a search for 'lorem ipsum'
will uncover many
web sites still in their infancy. Various versions have evolved over the
years, sometimes by
accident, sometimes on purpose (injected humour and the like.
</p>
</body>
</html>
OUTPUT:-
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
th, td {
padding: 15px;
</style>
</head>
<body>
<center>
<table style="width:100%;">
<tr>
<th>Sl no.</th>
<th>Name</th>
<th>Registration no.</th>
</tr>
<tr>
<td>1</td>
<td>Anuj</td>
<td>1011234</td>
</tr>
<tr>
<td>2</td>
<td>Soma</td>
<td>1011156</td>
</tr>
<tr>
<td>3</td>
<td>Ravi</td>
<td>1011453</td>
<tr>
<td>4</td>
<td>Rishi</td>
<td>1011256</td>
</tr>
</table>
</center>
</body>
</html>
OUTPUT:-
1 Anuj 1011234
2 Soma 1011156
3 Ravi 1011453
4 Rishi 1011256
Program:
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
th, td {
padding: 15px;
</style>
</head>
<body>
<center>
<table style="width:100%;">
<tr>
<th>Sl no.</th>
<th>Name</th>
<th>Registration no.</th>
</tr>
<tr>
<td>1</td>
<td>Anuj</td>
<td>1011234</td>
</tr>
<tr>
<td>2</td>
<td>Soma</td>
<td>1011156</td>
</tr>
<tr>
<td>3</td>
<td>Ravi</td>
<td>1011453</td>
<tr>
<td>4</td>
<td>Rishi</td>
<td>1011256</td>
</tr>
</table>
</center>
</body>
</html>
OUTPUT:-
1 Anuj 1011234
2 Soma 1011156
3 Ravi 1011453
4 Rishi 1011256
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
width: 100%;
th, td {
padding: 8px;
text-align: left;
</style>
</head>
<body>
<table>
<tr>
<th>Name</th>
<th>State</th>
<th>Country</th>
</tr>
<tr>
<td>Roy</td>
<td>odisha</td>
<td>India</td>
</tr>
<tr>
<td>Santanu</td>
<td>Bihar</td>
<td>India</td>
</tr>
<tr>
<td>Prakash</td>
<td>Kerala</td>
<td>India</td>
</tr>
</table>
</body>
</html>
OUTPUT:-