In: Computer Science
Given the html below, create css to produce the following illustrated color page output:
Red for outer paragraph and outer list
Green and italic for first inner div paragraph, green for second div paragraph, blue for inner list
HTML File
<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>
answer]
HTML File:
<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>
Css File:( mystyle98_d.css )
p,#fix{
color: red;
}
.above{
color: green;
font-style: italic;
}
.central1 p{
color: green;
}
ol #fix1{
color: blue;
}
output:
but make sure that the css file present in the current directory otherwise it will give you an error.
above css file changes the color of the font according to your question.if you want to change the background color of the paragraph the you can use ' background-colo: '
i provide you editable code with output.