Question

Given the following HTML code (You are not allowed to add additional id or class to...

Given the following HTML code (You are not allowed to add additional id or class to the file test.html)

test.html

  1. <h1>Down the Rabbit-Hole</h1>
  2. <div class="bb" >    
  3.    <p class="bb" >Alice was beginning to get very tired ...</p>
  4.    <br/>
  5.    <p> Alice </p>
  6. </div>
  7. <div id="aa">
  8.    <p>Down, down, down. Would the fall never come to an end</p>
  9.    <div> <p class="bb" >I wonder if I shall fall right …</p> </div>
  10. </div>
  11. <h1> Upcoming Event </h1>
  12. <p> Excitng Event: 101 </p>
  13. <p> A limited number of tickets area available. Email me. </p>

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.

b) Write the CSS code to make all <p> tags of class bb in green. (I mean make line #3 #9 in green text)

c) Write the CSS code to make line #9 in red only.

d) Write the CSS code to make line#12 in red only.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Html file with internal styling:

<!DOCTYPE html>

<head>

<style>

#aa{

color:red

}

.bb{

color:green;

}

p.bb{

color:red;

}

h1+p{

color:red;

}

</style>

</head>

<body>

<h1>Down the Rabbit-Hole</h1>

<div class="bb" >

<p class="bb" >Alice was beginning to get very tired ...</p>

<br/>

<p> Alice </p>

</div>

<div id="aa">

<p>Down, down, down. Would the fall never come to an end</p>

<div> <p class="bb" >I wonder if I shall fall right …</p> </div>

</div>

<h1> Upcoming Event </h1>

<p> Excitng Event: 101 </p>

<p> A limited number of tickets area available. Email me. </p>

</body>

Execution screenshot:

Note: please like the answer if you are satisfied with it.Thank you in advance.Happy HomeworkLibing.

Add a comment
Know the answer?
Add Answer to:
Given the following HTML code (You are not allowed to add additional id or class to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • d. clear-both usu The following question will be in relation to the HTML code shown below...

    d. clear-both usu The following question will be in relation to the HTML code shown below and CSS: 1. <h1>Down the Rabbit-Hole</h1> 2. <div class="bb" > 3. <p class="bb" >Alice was beginning to get very tired ...</p> <br/> 5. <p> Alice </p> 6. </div> 7. <div id="aa"> 8. <p>Down, down, down. Would the fall never come to an end</p> 9. <div> <p class="bb" >I wonder if I shall fall right ...</p> </div> 10. </div> 6. Which of the following will...

  • I'm having trouble to link the .js file to the html so changes for the html...

    I'm having trouble to link the .js file to the html so changes for the html to be made in the .js file <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>:JavaScript, HTML and jQuery</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- this is so I don't have to give you a separate CSS file --> <style>     .hidden {display: none;}     .menu { width: 100px;} </style> </head> <body> <div class="container"> <h1>Assignment 2: JavaScript, HTML and jQuery</h1> <p>To complete this...

  • Look at the following illustrated output for an HTML and a css given below <!DOCTYPE html>...

    Look at the following illustrated output for an HTML and a css given below <!DOCTYPE html> <head> <title>TABLE with STYLE SHEET</title> <meta charset="utf-8" /> <meta name="description" content="Godaddy Webpage original" /> <link rel = "stylesheet" href="GoDaddy_assignment_1.css"> <body> <img src= "GoDaddy.png"/> <p>Welcome to:<strong>webhamster.com</strong></br> This web page is parked<strong>Free</strong>courtesy of <a class="aclass1" href ="https://www.godaddy.com">GoDaddy.com</a></p> <h1>Want to buy<span class ="span2">webmaster.com ?</span></h1> <div class ="div1"> <a class ="aclass2" href="https://www.godaddy.com">Learn How</a> </div> </hr> <button>Search Ads</button> </body> </html> “ QUESTION continued Given the corresponding css file .aclass1{color:purple;}...

  • Hello Ive been tryting to add the CDN of jquery to my html code and I...

    Hello Ive been tryting to add the CDN of jquery to my html code and I keep getting an error Need help with this : ​​ Navigate to www.code.jquery.com in your Chrome browser. On this page, you'll find different stable versions of jQuery. Select uncompressed for jQuery Core 3.3.1. Copy the <script> tag that is given to you. In store_hours.html, paste that tag directly above your body's closing tag. This is the jQuery CDN. After you paste this code into...

  • can you do this js and html question. ill give you the html and js and...

    can you do this js and html question. ill give you the html and js and css files just fix my error use if and else like what i did dont use switch just fix my erorr. <!DOCTYPE html> <!-- Webpage HTML document for Lab 4. Authors: Amirhossein Chinaei, Andriy Pavlovych For: EECS 1012, York University, Lassonde School of Engineering --> <html lang="En"> <head> <meta charset="UTF-8"> <!-- title for web page --> <title> EECS1012: Lab 4 - Computational Thinking </title>...

  • PHP code that is given : <?php // Here is where your preprocessing code goes //...

    PHP code that is given : <?php // Here is where your preprocessing code goes // An example is already given to you for the First Name $fname = $_GET['fname']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Exercise 2 - GET Echo</title> <style> body { margin:0; padding:0; font-family: Arial; } form { margin:20px; } input[type="text"], input[type="password"] { width:150px; padding:3px; font-size:1em; } input[type="submit"] { padding:3px; font-size:1em; } label { display:inline-block; width:150px; } .input-container { padding:5px; } </style> </head> <body> <form...

  • HTML Coding <html> <head> <title> Contact -- Charles Robertson </title> </head> <body bgcolor="white"> <table width="700" height="500"...

    HTML Coding <html> <head> <title> Contact -- Charles Robertson </title> </head> <body bgcolor="white"> <table width="700" height="500" border="10"> <!-----row---1----logo---> <tr><td> <img src="20150516_084745" width="700" height="200"> </td></tr> <!-----row-2-navigation-----> <tr><td> <!----start-navigation-table----> <table width="700" height="100" border="5" bgcolor="lightgreen" > <tr><td><a href="HerbFarm.html"> <center> HOME </center></a></td> <td><a href="about3.html"> <center> ABOUT </center></a></td> <td><a href="contact3.html"> <center> CONTACT </center></a></td> <td><a href="gallery3.html"> <center> GALLERY </center></a></td> </tr> </table> <!------end-navigation-table----> </td></tr> <tr><td> <h1>Contact </h1> <form action="thankyou.html">    </form> <div class="row"> <div class="col-75"> <div class="container"> <form action="/action_page.php"> <div class="row"> <div class="col-50"> <h3>Billing Address</h3> <label for="fname"><i...

  • As part of this assignment we are using the base Gallery HTML and writing JavaScript code...

    As part of this assignment we are using the base Gallery HTML and writing JavaScript code that will: 1) preload the images provided to us, 2) Create rollover functionality for each of the thumbnails in your image gallery 3) Use appropriate images found in the images folder. 4) Write developer comments to describe the variables being declared and explain the functions and logical blocks of JavaScript code pertaining to the gallery. I know it has to be an external JS...

  • Create an external style sheet named Lab05.css. In this style sheet put the following styles: At the top of the style sheet, add the line: @charset "utf-8"; Add this comment: /* Lab 5 Extern...

    Create an external style sheet named Lab05.css. In this style sheet put the following styles: At the top of the style sheet, add the line: @charset "utf-8"; Add this comment: /* Lab 5 External Style Sheet - Brandon  */ Style the h1 element with a background color of lightgreen and center the text. Style the p element with a blue text color and yellow background color. Style the p element of class .firstclass with a green text color. Style the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT