In: Computer Science
HTML
I would like you to create a three paged website, where you can navigate to any page using a navigation bar.
One page must include an ordered list, one page must include an unordered list.
One page must include a picture. (please keep it appropriate.)
Each page much include a header and a footer, please have your name on each footer with the copyright symbol next to it.
Each page must be styled using CSS, and I would like you to use an external style sheet.
The content of the site can be of your choosing
Hi Please find the code below
NOTE: Please save all the files in same folder.
I have used an image of my system you can use as per your convenience
#1 home.html
<!DOCTYPE html>
<html>
<head>
<!-- to add an external css file use link tag as used below -->
<link rel="stylesheet" href="externalStyle.css">
</head>
<body>
<!-- create a div having class mainNavigation -->
<div class="mainNavigation">
<!-- use anchor tags for navigating to other pages -->
<a class="current" href="/home">Home</a>
<a href="advantages.html">Advantages of Sports</a>
<a href="about.html">About Us</a>
</div>
<!-- add header -->
<header>
<h2>Sports and Games</h2>
</header>
<div style="padding-left:16px">
<!-- oddered list -->
<ol>
<li>Football</li>
<li>Basketball</li>
<li>Hockey</li>
<li>Polo</li>
<li>Cricket</li>
</ol>
</div>
<!-- footer with name and copyright symbol -->
<div class="centerAlign">
<footer class="myFooter">
<p> MyName ⓒ</p>
</footer>
</div>
</body>
</html>
#2 advantages.html
<!DOCTYPE html>
<html>
<head>
<!-- to add an external css file use link tag as used below -->
<link rel="stylesheet" href="externalStyle.css">
</head>
<body>
<!-- create a div having class mainNavigation -->
<div class="mainNavigation">
<!-- use anchor tags for navigating to other pages -->
<a href="home.html">Home</a>
<a class="current" href="advantages.html">Advantages of Sports</a>
<a href="about.html">About</a>
</div>
<!-- add header -->
<header>
<h2>Advantages of Sports</h2>
</header>
<div style="padding-left:16px">
<!-- un-ordered list -->
<ul>
<li>One can learn how to work as a team member.</li>
<li>Physical Fitnees</li>
<li>Reduce pressure</li>
<li>Self Development</li>
<li>Leaership</li>
</ul>
</div>
<!-- footer with name and copyright symbol -->
<div class="centerAlign">
<footer class="myFooter">
<p> MyName ⓒ</p>
</footer>
</div>
</body>
</html>
#3 about.html
<!DOCTYPE html>
<html>
<head>
<!-- to add an external css file use link tag as used below -->
<link rel="stylesheet" href="externalStyle.css">
</head>
<body>
<!-- create a div having class mainNavigation -->
<div class="mainNavigation">
<!-- use anchor tags for navigating to other pages -->
<a href="home.html">Home</a>
<a href="advantages.html">Advantages of Sports</a>
<a class="current" href="about.html">About Us</a>
</div>
<!-- add header -->
<header>
<h2>About Us</h2>
</header>
<div style="padding-left:16px">
<p>
We have provide training for all types of sports. For further information please visit our training center.
</p>
<!-- image -->
<img src="images.jpg"/>
</div>
<!-- footer with name and copyright symbol -->
<div class="centerAlign">
<footer class="myFooter">
<p> MyName ⓒ</p>
</footer>
</div>
</body>
</html>
#4 externalStyle.css"
/* to add margin and font-family to body */
/* you can use as per your convenience */
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
/* main navigation class */
.mainNavigation {
overflow: hidden;
background-color: #333;
}
/* apply styling for anchor tags inside navigation bars */
.mainNavigation a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 12px 16px;
font-size: 15px;
}
/* apply color for hover */
.mainNavigation a:hover {
background-color: #ddd;
color: black;
}
/* current class specify the current page in navigation bar */
.mainNavigation a.current {
background-color: #4CAF50;
color: white;
}
/* add styling to footer */
.myFooter{
bottom:0;
position: absolute;
}
/* class to provide left margin of 50% */
.centerAlign{
margin-left: 50%;
}
OUTPUT
#1
#2
#3
Thanks
Hope it helps!!