Assignment 2
Assignment 2
CODE:
<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Navigation</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<a href="/home.html">Home</a> |
<a href="/about.html">About</a> |
<a href="/contact.html">Contact</a>
</nav>
<main>
<h2>Main Content</h2>
<p>This is the main content area of the page.</p>
</main>
</body>
</html>
Output:
2. Write an HTML code to demonstrate the use of inline css
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>External CSS</title>
</head>
<body>
<style>
</style>
<div style="text-align: center; font: bold;">
<h1><u>FUN FACT</u></h1>
</div>
<div style="color: blue;">
<p>
A fun fact about the Golden State Warriors is that
they hold the record for the most wins in a regular NBA season.
During the 2015-2016 season, the Warriors achieved a remarkable 73-9
record,
surpassing the previous record of 72 wins set by the 1995-1996 Chicago
Bulls.
Despite this impressive feat, the Warriors fell short in the NBA Finals
that year,
losing to the Cleveland Cavaliers.
</p>
</div>
</body>
</html>
Output:
3. Write an HTML code to demonstrate the use of internal css
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>External CSS</title>
</head>
<body>
<style>
*{
background-color: antiquewhite;
}
.head{
text-align: center;
font: bold;
font-family: cursive;
color: brown;
font-size: larger;
}
.para{
font-size: larger;
font-family: monospace;
font-style: italic;
color: darkblue;
padding-left: 20px;
padding-right: 20px;
}
</style>
<div class="head">
<h1><u>FUN FACT</u></h1>
</div>
<div class="para">
<p>
A fun fact about the Golden State Warriors is that
they hold the record for the most wins in a regular NBA season.
During the 2015-2016 season, the Warriors achieved a remarkable 73-9
record,
surpassing the previous record of 72 wins set by the 1995-1996 Chicago
Bulls.
Despite this impressive feat, the Warriors fell short in the NBA Finals
that year,
losing to the Cleveland Cavaliers.
</p>
</div>
</body>
</html>
OUTPUT:
}
.para{
font-size: larger;
font-family: monospace;
font-style: italic;
color: darkblue;
padding-left: 20px;
padding-right: 20px;
}
OUTPUT: