In: Computer Science
Note:
Save all files as the same name in answer and put all file and image in the same folder.
All different type of css has been mentioned in html file as comments.
External CSS file
assingment.css
/*for header backgrounf color*/
header {
background-color: #ffffff;
}
/*for wrapping up the base*/
#wrap {
width: 80%;
min-width:700px;
max-width:1024px;
margin-left: auto;
margin-right: auto;
}
/*for navigation bar color and width*/
.navi{
position: sticky;
top: 0;
height: 60px;
width: 100%;
display: flex;
align-items: center;
background: #ffff00;
}
/*for paragraph*/
p{
font-style: italic;
color: #800080;
}
/*for div tag*/
.d{
background-color: #00FFFF;
border: 2px solid black;
}
/*for hovering on div tag*/
.d:hover{
background-color: #ffffff;
}
.navi:hover{
background-color: #ffffff;
}
HTML FIles
page1.html
<!DOCTYPE HTML>
<html>
<!--for wrapping the
webpage-->
<div id="wrap">
<head>
<!--Here we giving link to an external css
file-->
<link rel = "stylesheet"
type="text/css" href="assingment.css">
<!-- This is internal css-->
<style>
h1{
text-align: center;
font-size: 200%;
font-family: serif;
color: #000080
}
h2{
text-align: left;
font-size: 100%;
font-family: serif;
color: #ff0000
}
</style>
<header>
<h1>This is Assignment First html</h1>
</header>
</head>
<body>
<!--navigation
bar-->
<nav class="navi">
<a href = "page1.html">Page 1</a>
<a href = "page2.html">Page 2</a>
<a href = "page3.html">Page 3</a>
<a href = "page4.html">Page 4</a>
<a href = "page5.html">Page 5</a>
</nav>
<h2> For this sentence internal css has been
used</h2>
<div class = "d">
<h2>The first paragraph</h2>
<p>This html page is about css
styles</p>
<p>Here we will learn different types of
css</p>
<p>There are 3 types of css </p>
<p>First one is inline where we include style
attributes in html file itself</p>
<p>Second is internal we put css code for group
in head part</p>
<p>Third is external where we include a link to
an external .css file</p>
</div>
<!--Here we will use inline
css-->
<footer style="font-size: 7;font-style: Bold;color:
#003366;">
Important Links<br>
<a href="www.youtube.com">Best lecture videos on
Css</a><br>
<a href="w3schools.com">Best website for learning
Css</a><br>
<a href="page1.html"><img src="home.png"
style="width:20px;height:40px;"></a>
</footer>
</body>
</div>
</html>
Image used: home.png
Output of Webpage
Note: Here only 1 html page has been included due to time limit. We can create 4 more html files just by changing the text in the paragraph and giving them name page2.html page3.html page4.html and page5.html respectively