Question

In: Computer Science

check the following code: is the requirements correct ? if not solve it . All the...

check the following code:

is the requirements correct ? if not solve it .

All the styles must be in a document style sheet. YOU ARE NOT ALLOWED TO USE THE type ATTRIBUTE ON THE LIST, you must use CSS to apply the style.

<!DOCTYPE html>

<html>

<head>

<title> car list</title>

<style>

body {background-color: powderblue;}

h1   {color: blue;}

p    {color: red;}

</style>

</head>

<body>

<style type="text/css"> ol{list-style-type:upper-roman;}

ol ol{list-style-type:upper-alpha;}

ol ol ol{list-style-type:decimal;}

li.compact{background-color:pink;}

li.midsize{background-color:blue;} li.sports{background-

color:red;}

ol.compact{background-color:pink;}

ol.midsize{background-color:blue;}

ol.sports{background-color:red;}

</style>

</head>

<body>

<h1>Nested Ordered List of Cars</h1>

<ol>

<li class="compact">Compact</li>

<ol class="compact">

<li>Two Door</li>

<ol>

<li>2012</li>

<li>Mod2012</li>

<li>REVA</li>

</ol>

<li>Four Door</li>

<ol>

<li>2012</li>

<li>Model 800</li>

<li>Maruthi Swift</li>

</ol>

</ol>

<li class="midsize">Midsize</li>

<ol class="midsize">

<li>Two Door</li>

<ol>

<li>2012</li>

<li>Mod2012</li>

<li>REVA</li>

</ol>

<li>Four Door</li>

<ol>

<li>2012</li>

<li>Model 800</li>

<li>Maruthi Swift</li>

</ol>

</ol>

<li class="sports">Sports</li>

<ol class="sports">

<li>Coupe</li>

<ol>

<li>2012</li>

<li>Mod2012</li>

<li>REVA</li>

</ol>

<li>Convertible</li>

<ol>

<li>2012</li>

<li>Model 800</li>

<li>Maruthi Swift</li>

</ol>

</ol>

</ol>

</body>

</html>

Solutions

Expert Solution

The code meets the requirement, but it would be better if you could move the CSS into an external file as shown in the code below.

CODE

theme.css
body {background-color: powderblue;}

h1 {color: blue;}

p {color: red;}

ol{list-style-type:upper-roman;}

ol ol{list-style-type:upper-alpha;}

ol ol ol{list-style-type:decimal;}

li.compact{background-color:pink;}

li.midsize{background-color:blue;} li.sports{background-

color:red;}

ol.compact{background-color:pink;}

ol.midsize{background-color:blue;}

ol.sports{background-color:red;}

HTML CODE

<!DOCTYPE html>

<html>
<head>
<title> car list</title>
<link rel="stylesheet" type="text/css" href="theme.css">
</head>
<body>
<h1>Nested Ordered List of Cars</h1>
<ol>
<li class="compact">Compact</li>
<ol class="compact">
<li>Two Door</li>
<ol>
<li>2012</li>
<li>Mod2012</li>
<li>REVA</li>
</ol>
<li>Four Door</li>
<ol>
<li>2012</li>
<li>Model 800</li>
<li>Maruthi Swift</li>
</ol>
</ol>
<li class="midsize">Midsize</li>
<ol class="midsize">
<li>Two Door</li>
<ol>
<li>2012</li>
<li>Mod2012</li>
<li>REVA</li>
</ol>
<li>Four Door</li>
<ol>
<li>2012</li>
<li>Model 800</li>
<li>Maruthi Swift</li>
</ol>
</ol>
<li class="sports">Sports</li>
<ol class="sports">
<li>Coupe</li>
<ol>
<li>2012</li>
<li>Mod2012</li>
<li>REVA</li>
</ol>
<li>Convertible</li>
<ol>
<li>2012</li>
<li>Model 800</li>
<li>Maruthi Swift</li>
</ol>
</ol>
</ol>
</body>
</html>


Related Solutions

Consider the following information. Which of the following is correct? Check all that apply. Date: October...
Consider the following information. Which of the following is correct? Check all that apply. Date: October 8, 2020.   Name: Apple Computer.   Symbol: AAPL.   Close: 116, up $1. Day high: 117. Day low: 115. Volume: 133 million shares. 10-day average volume: 139.5 million shares. Market capitalization: $2 trillion. Dividend: 2.5%. PE: 35. Beta 1.3. YTD % change: 55%. Check All That Apply Annual dividends total $2.50. Annual dividends total $2.50. Earnings per share in the last four quarters was $3.31. Earnings...
Which of the following statements about mutations and genetic disease are correct? CHECK ALL THAT APPLY!...
Which of the following statements about mutations and genetic disease are correct? CHECK ALL THAT APPLY! Check all that apply A. Some genetic diseases may be caused by the substitution of only one incorrect amino acid in a protein. B. A frameshift mutation affects only the codon directly after the addition or deletion. C. A change in DNA sequence may change the pattern of protein folding, resulting in genetic disease. D.It is possible for the substitution of one base for...
Which of the following are correct statements about international environmental laws? Check all that apply. A...
Which of the following are correct statements about international environmental laws? Check all that apply. A few environmental laws have established international institutions with power to directly impose trade sanction The task of direct enforcement is typically left to member nations International agreements have adequate resources to monitor and ensure compliance With consent, countries may sue each other for violation of international agreements There are both hard and soft environmental laws
Need the correct line of code for c program to solve  this equation . i is a...
Need the correct line of code for c program to solve  this equation . i is a value that the program all ready calculates from user imput. t i = (x*1000)+(y*500)+(z*250
Which of the following statements about foreign direct investment (FDI) are correct? Check all that apply....
Which of the following statements about foreign direct investment (FDI) are correct? Check all that apply. ______________________________________________________________________ The acquisition of a U.S. corporation by a German company is an example of European direct investment in the United States. Direct investment between the United States and Japan to produce the same automobile is classified as conglomerate diversification. FDI occurs when earnings of the parent company’s foreign subsidiary are reinvested in plant expansion. FDI flows include purchases of U.S. government bonds by...
Which following statement(s) about SAS names is/are correct? Check all that apply. A. A SAS variable...
Which following statement(s) about SAS names is/are correct? Check all that apply. A. A SAS variable name starts with a letter or an underscore and continues with any combination of numbers, letters, or underscores as the same as library reference names and data set names. B. A SAS library references name must be 8 characters or less and begin with a letter or an underscore. C. A SAS data set names are 1 to 32 characters in length and are...
Identify the correct statement in the context of forced convection. (Check all that apply.) A) Natural...
Identify the correct statement in the context of forced convection. (Check all that apply.) A) Natural convection enhances forced convection heat transfer in transverse flow. B) Natural convection hurts forced convection heat transfer in transverse flow. C) Natural convection enhances forced convection heat transfer in opposing flow. D) Natural convection hurts forced convection heat transfer in opposing flow.
Which of the following contain a coordinate covalent bond? Check all that apply. Check all that...
Which of the following contain a coordinate covalent bond? Check all that apply. Check all that apply. H3O+H3O+ H2OH2O BF−4
(Please do not attempt to solve if you can not fulfill all the requirements!!!!) THE ENERGY...
(Please do not attempt to solve if you can not fulfill all the requirements!!!!) THE ENERGY BAR INDUSTRY In 1986, PowerBar, a firm in Berkeley, California, single-handedly created the energy bar category. Positioned as an athletic energy food, it was distributed at bike shops and events that usually involved running or biking. The target segment was the athlete who needed an efficient, effective energy source. Six years later, seeking to provide an alternative to the sticky, dry nature of the...
Check all the correct statements. The internal energy of an ideal gas (those that obey PV...
Check all the correct statements. The internal energy of an ideal gas (those that obey PV = nRT) depends only the temperature of the system. The internal energy of any gas depends only the temperature of the system. The heat capacity of an ideal gas does not depend on what molecules the gas is made of. At constant temperature, the internal energy of a real gas increases with increasing pressure because molecules are closer together. We assume that the conditions...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT