chapter 5 assignment 2
chapter 5 assignment 2
DEVELOPMENT
Assignment #02
Tahreem Rafaqat
Name
ID 223317
Semester 5th
h1 {
font-family: Tahoma, Helvetica, sans-serif;
}
p{
font-size: 12pt;
font-family: Arial, sans-serif;
}
.special {
color: #6666ff;
}
</style>
</head>
<body>
<h1 class = "special">Deitel & Associates, Inc.</h1>
<p>Deitel & Associates, Inc. is an internationally
recognized corporate training and publishing organization
specializing in programming languages, Internet/World
Wide Web technology and object technology education.
The company provides courses on Java, C++, Visual Basic,
C#, C, Internet and World Wide Web programming, Object
Technology, and more.</p>
<h1>Clients</h1>
<p class = "special"> The company's clients include many
<em>Fortune 1000 companies</em>, government agencies,
branches of the military and business organizations.
Through its publishing partnership with Prentice Hall,
Deitel & Associates, Inc. publishes leading-edge
programming textbooks, professional books, interactive
web-based multimedia Cyber Classrooms, satellite
courses and World Wide Web courses.</p>
</body>
</html>
Output:
Program 3
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>More Styles</title>
<style type="text/css">
body {
font-family: Arial, Helvetica, sans-serif;
}
a.nodec {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
em{
font-weight: bold;
text-decoration: underline;
}
h1{
text-decoration: underline;
}
ul {
margin-left: 20px;
}
ul {
font-size: 0.9em;
}
</style>
</head>
<body>
<h1>Shopping list for Monday :</h1>
<ul>
<li>Milk</li>
<li>Bread
<ul>
<li>White Bread</li>
<li>Whole Wheat Bread</li>
</ul>
</li>
<li>Rice</li>
<li>Potatoes</li>
<li>Pizza <em>Extra Cheese</em></li>
</ul>
<p><em>Go to the </em>
<a class="nodec" href="https://www.foodpanda.pk/darkstore/p3ag/pandamart"
title="FoodPanda Online Grocery Store">online Grocery Store</a>
</p>
</body>
</html>
Output:
Program 4
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Linking embedded sheet styles</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1>Shopping list for Monday :</h1>
<ul>
<li>Milk</li>
<li>Bread
<ul>
<li>White Bread</li>
<li>Whole Wheat Bread</li>
</ul>
</li>
<li>Rice</li>
<li>Potatoes</li>
<li>Pizza <em>Extra Cheese</em></li>
</ul>
<p><em>Go to the </em>
<a class="nodec"
href="https://www.foodpanda.pk/darkstore/p3ag/pandamart" title="FoodPanda Online
Grocery Store">online Grocery Store</a>
</p>
</body>
</html>
Output:
Program 5
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Absolute Positioning</title>
<style type="text/css">
.bging{
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
.fging{
position: absolute;
top: 25px;
left: 100px;
z-index: 2;
}
.text{
position: absolute;
top: 25px;
left: 100px;
z-index: 3;
font-size: 20pt;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<p><img src="bging.png" class="bging" alt="First image Positioning"
/></p>
<p><img src="fging.png" class="fging" alt="Second image Positioning"
/></p>
<p class="text">Positioned Text</p>
</body>
</html>
Output:
Program 6
Code:
<?xml version="1.0" encoding="utf-8"?>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Absolute Positioning</title>
<style type="text/css">
p { font-size: 1.3em;
font-size: .6em;
height: 1em }
top: -1ex }
bottom: -1ex }
left: -1ex }
right: -1ex }
</style>
</head>
<body>
</p>
</p>
</p>
</body>
</html>
Output:
Program 7
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>background-images</title>
<style type="text/css">
body {
background-image: url(pakaims.png) ;
background-position: bottom right;
background-repeat: no-repeat;
background-attachment: fixed;
background-color: #eeeeee;
}
p{
font-size: 18pt;
color: #1144AA;
text-indent: 1em;
font-family: Arial, Helvetica, sans-serif;
}
.dark{
font-weight: bold;
}
</style>
</head>
<body>
<p>
This example uses the background-image,
background-position and background-attachment
styles to place the <span class = "dark">Pak-aims
& Institute of Management and Sciences, Inc.</span> logo in the bottom,
right corner of the page. Notice how the logo
stays in the proper position when you resize the
browser window. The background-color fills in where
there is no image.
</p>
</body>
</html>
Output:
Program 8
Code:
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Flowing Text Around Floating Elements</title>
<style type = "text/css">
div.heading { background-color: #bbddff;
text-align: center;
font-family: arial, helvetica, sans-serif;
padding: .2em }
p { text-align: justify;
font-family: verdana, geneva, sans-serif;
margin: .5em }
div.floated { background-color: #eeeeee;
font-size: 1.5em;
font-family: arial, helvetica, sans-serif;
padding: .2em;
margin-left: .5em;
margin-bottom: .5em;
float: right;
text-align: right;
width: 50% }
div.section { border: 1px solid #bbddff }
</style>
</head>
<body>
<div class="heading"><img src="pakaims.png" alt="Pakaims logo" /></div>
<div class="section">
<div class="floated">CS and BBA PRograms</div>
<p>Pak-aims & Institute of Management and Sciences, Inc. is an internationally
recognized corporate training and publishing organization
specializing in programming languages, Internet/World
Wide Web technology and object technology education.
The company provides courses on Java, C++, Visual Basic, C#,
C, Internet and web programming, Object
Technology, and more.</p>
</div>
</body>
</html>
Output:
Program 10
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Drop Down Menu</title>
<style type="text/css">
body{
font-family: Arial, Helvetica, sans-serif;
}
div.menu{
font-weight: bold;
color: white;
border: 2px solid #22776ce3;
text-align: center;
width: 10em;
background-color: #22776ce3 ;
}
div.menu:hover a{ display: block;}
div.menu a{display: none;
border-top: 2px solid #22776ce3;
background-color: white;
width: 10em;
text-decoration: none;
color: black;}
div.menu:hover a{background-color: #dfeeff ;}
</style>
</head>
<body>
<div class="menu">
Menu
<a href="#">Home</a>
<a href="#">News</a>
<a href="#">Blog</a>
<a href="#">Articles</a>
<a href="#">Contact</a>
</div>
</body>
</html>
Output: