In: Computer Science
Given the HTML below ( do not modify the HTML), Outer paragraph, outer list, div with 2 inner paragraphs and one inner list , create a CSS which will: a) Make the outer list text color blue , and make the outer (non div) paragraph blue, and the div inner list element pink also inside the div element make the first inner paragraph green, and in the div element the second paragraph blue, so that in order: blue-blue-green-blue-pink b)As a separate case, make the text elements of all the div elements red , except the second div paragraph blue and italic and also make the outer non div paragraph cyan so that in order: cyan-black-red-blue-red C)As a separate case, create css to make all the text elements of the HTML page alternate between blue, Red , green,blue,red ( in that order) D)As another separate case , create css to make the non-div paragraph red, and the div inner paragraphs cyan, so that in order: red-black-cyan-cyan-black
GIVEN HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle98_d.css">
</head>
<body>
<p>
I'm a paragraph, what color am I ?
</p>
<ul>
<li id = "fix"> I'm a list item;what color am I? </li>
</ul>
<div class = "central1">
<p class ="above">
I'm a paragraph; what color am I?
</p>
<p>
I'm another paragraph, what color am I ?
</p>
<ol>
<li id = "fix1"> I'm another list item;what color am I? </li>
</ol>
</div>
</body>
</html>
First create css file mystyle98_d.css
there are four separate case
A) blue-blue-green-blue-pink
/*set text color blue outer div list*/
#fix{
color: blue;
}
/*set text color blue outer and inner div paragraphs */
p{
color: blue;
}
/*set text color pink inner div list*/
#fix1{
color: pink;
}
/*set text color green inner div first paragraph */
p.above{
color: green;
}
B) cyan-black-red-blue-red
/*set text color red inner div first paragraph and set font
style normal*/
p.above{
color: red;
font-style: normal;
}
/*set text color red inner div list */
#fix1{
color: red;
}
/*set text color blue inner div second paragraph and font style
italic*/
div p{
color: blue;
font-style: italic;
}
/*set text color cyan outer div paragraph */
p{
color: cyan;
}
C) blue-red-green-blue-red
/*set text color red outer div list*/
#fix{
color: red;
}
/*set text color green inner div first paragraph */
p.above{
color: green;
}
/*set text color blue inner div second paragraph */
div p{
color: blue;
}
/*set text color blue outer div paragraph */
p{
color: blue;
}
/*set text color red inner div list */
#fix1{
color: red;
}
D) red-black-cyan-cyan-black
/*set text color cyan inner div both paragraphs*/
div p{
color: cyan;
}
/*set text color red outer div paragraph */
p{
color: red;
}
==Please Upvote==