Question

Help to add .css file to this code that will add title color, table border color,...

Help to add .css file to this code that will add title color, table border color, blue color to top (row1) blue color, (row2,3, and 4) light grey color; column 1 and column 3 row 1 blue color; column 1 and column 3 rows 2,3,and 4 red color. text inside table and caption is white color.

<!-- *** Table Start *** -->
<table border="1" width="400" align = "center" style="margin-top: 40px;" cellpadding="5" cellspacing="0" summary="A description of the specialty coffee menu items with one item listed in each row. The first column contains the name of the menu item. The second column describes the specialty coffee. The third column contains the price.">

<caption>Coffee Menu</caption>
<tr>
<th>Specialty Coffee</th>
<th>Description</th>
<th>Price</th>
</tr>
<tr>
<td>Lite Latte</td>
<td>Indulge in a shot of organic, locally roasted espresso with steamed, skim milk. </td>
<td>$3.50</td>
</tr>
<tr>
<td>Mocha Latte</td>
<td>Chocolate lovers will enjoy a shot of organic, locally roasted espresso, steamed milk, and your choice of melted dark, milk, or white chocoloate.</td>
<td>$4.00</td>
</tr>
<tr>
<td>Turtle Treasure</td>
<td>A lucious mocha latte with caramel and pecan syrup &mdash; a candy bar in a cup.</td>
<td>$4.50</td>
</tr>
</table>

<!-- *** Table Ends *** -->

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  • I hve added css script as per your requirement inside style tag.

Source code:-

<!DOCTYPE html>
<html lang="en">
<head>
<title>Table Practice</title>
<meta charset="utf-8">
<style>
table { margin: auto;
        border: 5px solid #000066;
        width: 600px;
       border-spacing: 0;
}
td, th { padding: 0.5em;
       border-style: none;
         font-family: Arial, sans-serif;
}
caption { font-family: Verdana, sans-serif;
          font-weight: bold;
          font-size: 1.2em;
          padding-bottom: 0.5em;
}
tr:nth-of-type(even) { background-color: #eaeaea; }
tr:first-of-type { background-color: #000066;
                   color: #eaeaea;
}
</style>
</head>
<body>
<table border="1">
<caption>Lighthouse Island Bistro Specialty Coffee Menu</caption>
   <tr>
     <th>Specialty Coffee</th>
   <th>Description</th>
     <th>Price</th>
</tr>
<tr>
     <td>Lite Latte</td>
     <td>Indulge in a shot of organic, locally roasted espresso with steamed, skim milk. </td>
   <td>$3.50</td>
</tr>
<tr>
     <td>Mocha Latte</td>
     <td>Chocolate lovers will enjoy a shot of organic, locally roasted espresso, steamed milk, and your choice of melted dark, milk, or white chocoloate.</td>
   <td>$4.00</td>
   </tr>
    <tr>
     <td>Turtle Treasure</td>
     <td>A lucious mocha latte with caramel and pecan syrup &mdash; a candy bar in a cup.</td>
   <td>$4.50</td>
</tr>
</table>

</body>
</html>

----------------------------------------------------------------------------------

Output:-

__________________________________________________________________________________

If you are satisfy with my answer then please,please like it.

Add a comment
Know the answer?
Add Answer to:
Help to add .css file to this code that will add title color, table border color,...
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
  • HTML/CSS: Modify the table you created in hands-on exercise 8.1 to be centered on the page,...

    HTML/CSS: Modify the table you created in hands-on exercise 8.1 to be centered on the page, use a background color of #CCCC99, and display text in arial or the browser default sans-serif font. Configure this table using CSS instead of obsolete HTML attributes. Place an e-mail link to yourself on the web page. Save the file as mytable.html. HERE IS THE CODE FOR 8.1: <!DOCTYPE html> <html lang="en"> <head> <title>Practice with Tables</title> <meta charset="utf-8"> </head> <body> <table border="1" > <caption>School...

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