Sunteți pe pagina 1din 11

Q

WAP to implement CSS(Cascading Style Sheet).

External Style Sheet


Code:Style sheet
body{font:14pt "arial";color:white;background:black}
h1{font:12pt "times roman" bold}
p{font:12pt"times roman"}
h4{font 26pt "times roman" italics}
a{text-decorator:blinking;color:green}
HTML Document
<html>
<head><title></title>
<link rel="stylesheet" href="vv.css" type="text/css">
</head>
<body>
<h1>HEALTH BENIFITS</h1>
<p>Eating a diet rich in <a
href="file:///C:/Users/hp/Desktop/vagetables.html">vegetables</a> and fruits as
part of an overall healthy diet may reduce risk for heart disease, including heart
attack and stroke.
Eating a diet rich in some <h4>vegetables and fruits</h4> as part of an overall
healthy diet may protect against certain types of cancers.</p>
<p>Diets rich in foods containing fiber, such as some vegetables and fruits, may
reduce the risk of heart disease, obesity, and type 2 diabetes.
Eating vegetables and fruits rich in potassium as part of an overall healthy diet may
lower blood pressure, and may also reduce the risk of developing kidney stones and
help to decrease bone loss.
Eating foods such as <a href="file:///C:/Users/hp/Desktop/fruits.html">fruits</a>
that are lower in calories per cup instead of some other higher-calorie food may be
useful in helping to lower calorie intake

dpuf</p>
</body>
Vegetables page linking
</html>
<html>
<head><title>Vegetables</title>
<link rel="stylesheet" href="vv.css" type="text/css">
</head>
<body>
<h1>Vegetables</h1>
<p>"Veggie" redirects here. For the diet which only contains plants, see Veganism.
For other uses, see Vegetable (disambiguation).
Vegetables in a market in the Philippines</p>
<p>In everyday usage, a <h4>vegetable</h4> is any part of a plant that is
consumed by humans as food as part of a savory meal. </p>The term "vegetable"
is somewhat arbitrary, and largely defined through culinary and cultural tradition. It
normally excludes other food derived from plants such as fruits, nuts and cereal
grains, but includes seeds such as pulses. The original meaning of the word
vegetable, still used in biology, was to describe all types of plant, as in the terms
"vegetable kingdom" and "vegetable matter".
</body>
</html>
Fruits page linking
<html>
<head><title>Fruits</title>
<link rel="stylesheet" href="vv.css" type="text/css">
</head>
<body>
<h1>Fruits</h1>

<p>In botany, a fruit is the seed-bearing structure in flowering plants (also known
as angiosperms) formed from the ovary after flowering.</p>
<p><h4>Fruits</h4> are the means by which angiosperms disseminate seeds.
Edible fruits, in particular, have propagated with the movements of humans and
animals in a symbiotic relationship as a means for seed dispersal and nutrition; in
fact, humans and many animals have become dependent on fruits as a source of
food.</p> Accordingly, fruits account for a substantial fraction of the world's
agricultural output, and some (such as the apple and the pomegranate) have
acquired extensive cultural and symbolic meanings.
</body>
</html>
Output:-

Internal Style Sheet


Code:HTML Document
<html>
<head><title></title>
<style type="text/css">
body{font:12pt"arial";color:white;background:black}
h1{font:12pt"times roman"bold}
p{font:12pt"times roman"}
h4{font:26pt"times roman" italics}
a{text-decorator:blinking;color:white}
</style>
</head>
<body>
<h1>HEALTH BENIFITS</h1>
<p>Eating a diet rich in <a
href="file:///C:/Users/hp/Desktop/vagetables.html">vegetables</a> and fruits as
part of an overall healthy diet may reduce risk for heart disease, including heart
attack and stroke.
Eating a diet rich in some <h4>vegetables and fruits</h4> as part of an overall
healthy diet may protect against certain types of cancers.</p>
<p>Diets rich in foods containing fiber, such as some vegetables and fruits, may
reduce the risk of heart disease, obesity, and type 2 diabetes.
Eating vegetables and fruits rich in potassium as part of an overall healthy diet may
lower blood pressure, and may also reduce the risk of developing kidney stones and
help to decrease bone loss.
Eating foods such as <a href="file:///C:/Users/hp/Desktop/fruits.html">fruits</a>
that are lower in calories per cup instead of some other higher-calorie food may be
useful in helping to lower calorie intake
dpuf</p>

</body>
</html>
Vegetables page linking
<html>
<head><title>Vegetables</title>
<style type="text/css">
body{font:12pt"arial";color:white;background:black}
h1{font:12pt"times roman"bold}
p{font:12pt"times roman"}
h4{font:26pt"times roman" italics}
a{text-decorator:blinking;color:white}
</style>
</head>
<body>
<h1>Vegetables</h1>
<p>"Veggie" redirects here. For the diet which only contains plants, see Veganism.
For other uses, see Vegetable (disambiguation).
Vegetables in a market in the Philippines</p>
<p>In everyday usage, a <h4>vegetable</h4> is any part of a plant that is
consumed by humans as food as part of a savory meal. </p>The term "vegetable"
is somewhat arbitrary, and largely defined through culinary and cultural tradition. It
normally excludes other food derived from plants such as fruits, nuts and cereal
grains, but includes seeds such as pulses. The original meaning of the word
vegetable, still used in biology, was to describe all types of plant, as in the terms
"vegetable kingdom" and "vegetable matter".
</body>
</html>

Fruits page linking


<html>
<head><title>Fruits</title>
<style type="text/css">
body{font:12pt"arial";color:white;background:black}
h1{font:12pt"times roman"bold}
p{font:12pt"times roman"}
h4{font:26pt"times roman" italics}
a{text-decorator:blinking;color:white}
</style>
</head>
<body>
<h1>Fruits</h1>
<p>In botany, a fruit is the seed-bearing structure in flowering plants (also known
as angiosperms) formed from the ovary after flowering.</p>

<p><h4>Fruits</h4> are the means by which angiosperms disseminate seeds.


Edible fruits, in particular, have propagated with the movements of humans and
animals in a symbiotic relationship as a means for seed dispersal and nutrition; in
fact, humans and many animals have become dependent on fruits as a source of
food.</p> Accordingly, fruits account for a substantial fraction of the world's
agricultural output, and some (such as the apple and the pomegranate) have
acquired extensive cultural and symbolic meanings.
</body>
</html>

Output:-

Inline Style Sheet


Code:<html>
<head><title></title>
</head>
<body>
<h1 style="font:24pt"arial" bold">HEALTH BENIFITS</h1>
<p style="font:"arial"18pt">
Eating a diet rich in vegetables and fruits as part of an overall healthy diet may
reduce risk for heart disease, including heart attack and stroke.
Eating a diet rich in some vegetables and fruits as part of an overall healthy diet
may protect against certain types of cancers.</p>
<p style="font:"timesroman"18pt">Diets rich in foods containing fiber, such as
some vegetables and fruits, may reduce the risk of heart disease, obesity, and type
2 diabetes.
Eating vegetables and fruits rich in potassium as part of an overall healthy diet may
lower blood pressure, and may also reduce the risk of developing kidney stones and
help to decrease bone loss.
Eating foods such as fruits that are lower in calories per cup instead of some other
higher-calorie food may be useful in helping to lower calorie intake
dpuf</p>
</body>
</html>

Output:-

S-ar putea să vă placă și