Experiment 1
Experiment 1
1. Program 1: Write a program to change the background color of a webpage using Internal
CSS.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
background-color: lightblue; /* You can change this color to any desired color */
</style>
</head>
<body>
</body>
</html>
2. Program 2: Write a program to style a heading, paragraph, and list using Internal CSS.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
h1 {
color: darkblue;
font-family:bold;
text-align: left-corner;
font-size: 36px;
margin-top: 20px;
p{
font-size: 18px;
line-height: 1.6;
color:brown;
text-align:left-corner
margin: 20px;
ul {
list-style-type: square;
padding-left: 40px;
ul li {
font-size: 18px;
color:green;
margin-bottom: 10px;
body {
font-family: bold;
background-color: white;
margin: 0;
padding: 0;
</style>
</head>
<body>
<h1>This ia a Heading</h1>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</body>
</html>
1. Program 3: Write a program using Internal CSS to apply different font styles, colors, and
sizes to multiple HTML elements.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
background-color:white;
margin: 0;
padding: 20px;
h1 {
color:blue;
font-size: 45px;
text-align: left-corner;
}
p{
font-family:italic;
color: purple;
font-size: 28px;
font-weight:italic;
</style>
</head>
<body>
<h1>Main Heading</h1>
</body>
</html>
Program 4: Write a program to demonstrate the use of padding and margin using Internal CSS.