Question

In: Computer Science

q: Given the following HTML for a table, put all these questions into one application (use...

q: Given the following HTML for a table, put all these questions into one application (use css)

a)   Modify the html to create another column called Assessment, and then modify the html to
extend the data in the rows ( you may use arbitrary numbers for the data items in the td elements)
b)   Make all table text elements blue using either css or html modification
c)   Make the background color of the columns alternate between pink and yellow,
<!DOCTYPE html>
<html>


<head>
<title>TABLE with STYLE SHEET</title>
<meta charset="utf-8" />
<meta name="description" content="How to form a table and apply styling." />
<link href="table1.css" type="text/css" rel="stylesheet" />
</head>

<body>
<table border = "1">
<col class ="product" />
<colgroup class = "facts">
<col/> <col/> <col class = "fat" />
</colgroup>
<tr>
<th> Product </th>
<th> Size (oz) </th>
<th> Caffeine (mg) </th>
<th> Fat (g) </th>

</tr>
<tr> <td> Green Tea </td> <td>8</td><td>20 </td> <td>0 </td></tr>
<tr> <td> Dark Chocolate </td> <td>2</td><td>20 </td> <td>19 </td></tr>
</table>

</body>
</html>

Solutions

Expert Solution

Answer a:

Add this line in first <tr> to add new column Assesment

<th> Assessment </th>

TO add new data add below before the </table>

<tr>

<td> Lemon Tea </td> <td>8</td><td>10 </td> <td>9 </td><td>Yes </td>\

</tr>

<tr>

<td> Black Tea </td> <td>6</td><td>15 </td> <td>8 </td><td>Yes </td>

</tr>

Output:

Answer b:

Replace <table> tag with below code to make all table text elements blue

<table border = "1" style="color: blue ;">

Output:

Answer c:

<colgroup> tag is used for formation of one or more column

Add below code inside <table> tag to make the background color of the columns alternate between pink and yellow,

<colgroup>

    <col style="background-color:pink">

    <col style="background-color:yellow">

    <col style="background-color:pink">

    <col style="background-color:yellow">

    <col style="background-color:pink">

</colgroup>

Output:

Complete code:

<!DOCTYPE html>

<html>

<head>

<title>TABLE with STYLE SHEET</title>

<meta charset="utf-8" />

<meta name="description" content="How to form a table and apply styling." />

<link href="table1.css" type="text/css" rel="stylesheet" />

</head>

<body>

<!-- Change Font color -->

<table border = "1" style="color: blue ;">

<!-- make the background color of the columns alternate between pink and yellow, -->

<colgroup>

    <col style="background-color:pink">

    <col style="background-color:yellow">

    <col style="background-color:pink">

    <col style="background-color:yellow">

    <col style="background-color:pink">

</colgroup>

<tr>

<th> Product </th>

<th> Size (oz) </th>

<th> Caffeine (mg) </th>

<th> Fat (g) </th>

<!-- create another column called Assessment -->

<th> Assessment </th>

</tr>

<tr>

<td> Green Tea </td> <td>8</td><td>20 </td> <td>0 </td><td>Yes </td>

</tr>

<tr>

<td> Dark Chocolate </td> <td>2</td><td>20 </td> <td>19 </td><td>No </td></tr>

<!-- Add data items -->

<tr>

<td> Lemon Tea </td> <td>8</td><td>10 </td> <td>9 </td><td>Yes </td>

</tr>

<tr>

<td> Black Tea </td> <td>6</td><td>15 </td> <td>8 </td><td>Yes </td>

</tr>

</table>

</body>

</html>

At any point if you find any difficulty feel free ask me.


Related Solutions

(Dimension the following html application describe positioning, dimensions of and color of all of the section...
(Dimension the following html application describe positioning, dimensions of and color of all of the section elements. ( ONLY DESCRIBE THE SECTION ELEMENTS IN DETAIL) For A) Everything as given in the HTML and CSS with section height 675 excluded ( commented out as given) With the section height of 675 uncommented ( included) <html>   <head>     <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="square12.css">   <title>Squarespace layout</title>   </head>   <body>     <nav></nav>     <header></header>     <section>       <!-- main paragraph -->       <p></p>       <!-- Two column-type things -->       <div...
Computer science!: (Dimension the following html application and describe positioning, dimensions of, and color of all...
Computer science!: (Dimension the following html application and describe positioning, dimensions of, and color of all of the section elements. (DESCRIBE ONLY THE SECTION ELEMENTS IN DETAIL) For A) Everything as given in the HTML and CSS with section height 700 excluded ( commented out as given) With a section height of 750   included <html> <head>     <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="square12.css"> <title>Squarespace layout</title> </head>      <body>     <nav></nav>     <header></header>     <section>       <!-- main paragraph -->      ...
Use the data given in the table to answer the following questions. The data represents the...
Use the data given in the table to answer the following questions. The data represents the average number of miles that a salesperson travels in a day verses the number of sales made each month. Miles, x 24 32 75 41 76 107 32 46 112 Sales, y 76 58 190 112 141 235 24 147 188 (a) What is the value of the correlation coefficient for this set of data? Round to 3 decimal places. (b) What is the...
This is all one question: 1.   Given the following table that is used by an investment...
This is all one question: 1.   Given the following table that is used by an investment firm to keep track of stock transactions (buy/sell) for clients Transaction (Stock Symbol, StockName, Trans-Date, Trans-time, Number_of_Shares, Transaction_type, Trans-Price, AccountNo, ClientName)   Note, The investment firm have many clients who may have multiple accounts. But each account only associates with one client. An account includes multiple stocks.   On a trading day, a client can buy or sell any number of stock in his/her account. A...
Use the following table for 2-4.  Assume that all labor units are paid equally.             L          Q     
Use the following table for 2-4.  Assume that all labor units are paid equally.             L          Q         FC       VC      TC       MC      AFC    AVC   ATC             ==============================================             0           0                                A         --         --          --        --             1           4                                 2          10                    60                      C             3          15                                150                                 B 2. What is the value of A?             a)  $0             b)  $30             c)  $60             d)  $210             e)  none of the above is correct 3. What is the value of B?             a)  $6             b)  $10             c)  $30             d)  $45             e)  none of the above is correct 4. What is the value of C?             a)  $5             b)  $6             c)  $15             d)  $30             e)  none of the above is correct
Answer the following questions using the data given in the table. Use the T-Test Paired Two...
Answer the following questions using the data given in the table. Use the T-Test Paired Two Sample for Means to arrive at the solutions to the questions below. Use an alpha value of 0.01 Home Appraiser 1 Appraiser 2 A $235,000 $228,000 B $210,000 $205,000 C $231,000 $219,000 D $242,000 $240,000 E $205,000 $198,000 F $230,000 $223,000 G $231,000 $227,000 H $210,000 $215,000 I $225,000 $222,000 J $249,000 $245,000 K $199,000 $201,000 1 What is the value for the test...
Use a style sheet to define the following rules and implement the given HTML code. Please...
Use a style sheet to define the following rules and implement the given HTML code. Please put your style information within the same file as the HTML code. Rules • Hyperlinks using the nodec class should display no decoration. • Hyperlinks should display text in white with a green background color when the mouse pointer is held over the link. (use the hover pseudo-class) • Unordered lists not nested within any other lists should be displayed in blue text and...
Given the following input-output table, answer questions a-h. Note that a one word answer is not...
Given the following input-output table, answer questions a-h. Note that a one word answer is not acceptable. For full credit, you must provide explanation for your answers and show how you arrive at them.                              Man Hour Required to Produce Unit of Output                                Country A            Country B                     Good X         3                    12                     Good Y         2                    14             a. Which country has absolute advantage in which good? Why?             b. Which country has comparative advantage in which good? Why?...
Given the following input-output table, answer questions a-h. Note that a one word answer is not...
Given the following input-output table, answer questions a-h. Note that a one word answer is not acceptable. For full credit, you must provide explanation for your answers and show how you arrive at them.                              Man Hour Required to Produce Unit of Output                                Country A            Country B                     Good X         3                    12                     Good Y         2                    14             a. Which country has absolute advantage in which good? Why?             b. Which country has comparative advantage in which good? Why?...
Given the following input-output table, answer questions a-h. Note that a one word answer is not...
Given the following input-output table, answer questions a-h. Note that a one word answer is not acceptable. Provide explanation for your answers and show how you arrive at them.                             Man Hour Required to Produce Unit of Output                               Country A           Country B                    Good X        3 12                    Good Y        2                   14            a. Which country has absolute advantage in which good? Why?            b. Which country has comparative advantage in which good? Why?            c. What is the pre-trade price ratio in each country? Why?            d. What will be...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT