HTML program to develop a web page using CSS for website page
index.html
<html>
<head>
<title>Practical No. 12</title>
<link rel="stylesheet" type="text/css" href="./mystyle.css">
</head>
<body>
<h1>My First Website</h1>
<ul>
<li>About</li>
<li>Home</li><br>
<li>Contact</li>
</ul>
<br><br><br>
<div>
<h2>Home</h2>
<p>This is my first webpage! I was able to code all the HTML and CSS in order to make it. Watch out world of web
design here I come!</p>
</div>
</body>
</html>
mystyle.css
body {
padding: 20px;
background: cyan;
}
h1 {
width: 200px;
}
ul {
float: right;
position: absolute;
right: 20px;
top: 10px;
width: 300px;
}
li {
list-style-type: none;
display: inline-block;
padding: 20px;
background-color: black;
color: white;
font-size: 20px;
font-weight: bold;
margin: 5px;
float: right;
}
div {
background: white;
display: inline-block;
position: relative;
padding: 15px;
}
OUTPUT