1. Program to use background color property .
<html>
<head>
<style>
body
{
background_color: red;
}
</style>
</head>
<body>
<h1> Welcome to HTML </h1>
</body>
</html>
Output-
2. Program to use various font properties in CSS.
<html>
<head>
<style>
h1
{ font-family: Lucida Handwriting;
}
p
{
Font-size:60px;
Font weight: Bold;
Text-align: center;
Text-decoration: overline;
Text-transform: uppercase;
}
</style>
</head>
<body>
<h1><p> Welcome to Cascading Style Sheet</p></h1>
</body>
</html>
Output-
3.Program to use Border, border width, border style and border color
property.
<html>
<head>
<style>
p
{
border-width:5px;
border-style: dashed;
border-color: red;
}
</style>
</head>
<body>
<p>
Welcome to CASCADING STYLE SHEET
</p>
</body>
</html>
Output-
4.Program to make a webpage
<html>
<head>
<style>
body
{
text-align: center;
}
h1
{ text-shadow: 2px 7px grey;
}
h2
{ text-decoration: underline;
text-transform: uppercase;
}
p
{ font-style: italic;
}
a
{ color: red;
}
</style>
</head>
<body>
<h1>
Welcome to HYPER TEXT MARKUP LANGUAGE
</h1>
<h2>
Cascading Style Sheet
</h2>
<p> Cascading Style Sheet(CSS) is a simple mechanism for adding
style( e.g. Font (colors, spacing) to web documents. These pages
contain information on how to learn and use CSS and on available
software. They also contain news from the CSS working group.
</p>
<a href=www.google.com> click here for more info</a>
</body>
</html>
Output-
5. Program to use image property.
<html>
<head>
<style>
img
{ height: 100px;
width: 200px;
opacity:0.4;
}
</style>
</head>
<body>
<img src= “location of the file filename.jpg” alt=”not available”>
</body>
</html>
Output-
6. Program to access elements from a list using list index
my_list= [‘p’,’r’,’o’,’b’,’e’]
print(my_list[0])
print(my_list[2])
print(my_list[4])
output-
7. Program to change elements in a list .
odd= [2,4,6,8]
odd[0]=1
odd[2:4]=[3,5,7]
print(odd)
output-
8. Program to add elements in a list using append() and
extend().
odd=[1,3,5]
odd.append(7)
odd.extend([9,11,13])
print(odd)
output-
9. Program to add two lists using (+) and (*) operator.
odd=[1,3,5]
print(odd + [9,11,15])
print([“re”] * 5)
output-
10. Program to import array library and then creating array.
import array as arr
a= arr.array(‘d’, [1.1, 3.5, 4.7])
print(a)
output-
11. Program to add elements in array using append() and
extend().
import array as arr
numbers= arr.array(‘i’,[1, 2,3,4])
numbers.append(5)
print(numbers)
numbers.extend([6,7,8])
print(numbers)
output-