In: Computer Science
Given the following HTML code (You are not allowed to add additional id or class to the file test.html)
test.html
a) I want to style the text from line 7 to 10. Write the CSS code to achieve the goal so that the text from line 7 to 10 in red.
Write code here:
b) Write the CSS code to make all <p> tags of class bb in green. (I mean make line #3 #9 in green text)
Write code here:
c) Write the CSS code to make line #9 in red only.
Write code here:
d) Write the CSS code to make line#12 in red only.
Write code here:
a) Line 7 to 10 are in a div with class aa. So, style the class aa so that its color is red.
<style>
#aa{
color:
red;
}
</style>
Output;
b) to make all <p> tags of class bb in green use the below code:
Here, p.bb indicates paragraph tags of class bb
<style>
p.bb{
color:
green;
}
</style>
Output:
C) CSS code to make line #9 in red only.
Add inlince CSS to line #9 so that it is in red.
<div > <p class="bb" style="color: red">I wonder if I shall fall right …</p> </div>
Output:
d) CSS code to make line#12 in red only.
Add inline CSS to line #12 to make it red in color.
<p style="color: red"> Excitng Event: 101 </p>
Output: