Look at the code, and then answer the question below. <style type=\"text/css\">
ID: 3593205 • Letter: L
Question
Look at the code, and then answer the question below.
<style type="text/css">
#intro {
text-transform: uppercase;
font-style: italic;
text-indent: 0px;
}
</style>
...
<body>
<div>
<p id="intro">
Alice was beginning to get very tired of sitting by her sister on the bank.
</p>
...
Which of the following statements is true according to the code?
The paragraph with the id="intro" atribute is indented.
The #intro style applies to all paragraphs.
Text in the paragraph with the id="intro" atribute is blue.
Text in the paragraph with the id="intro" atribute is all uppercase and italic.
Mark this and return
Explanation / Answer
Look at the code, and then answer the question below.
<style type="text/css">
#intro {
text-transform: uppercase;
font-style: italic;
text-indent: 0px;
}
</style>
...
<body>
<div>
<p id="intro">
Alice was beginning to get very tired of sitting by her sister on the bank.
</p>
...
Which of the following statements is true according to the code?
Explanation:
Before answering the question let us first examine what styles the css in the above code applies.
The #intro is an id, when any element in the html has the id attribute set to intro then the styles specified for intro will be applied to all those elements whose id is intro.
The styles that are applied are, the text will be in uppercase and italic and there will be no indentation.
Now coming to the question
1. The paragraph with the id="intro" attribute is indented.
Answer: False
In the css we have text-indent = 0px which means there is no indentation, so the paragraph with the id = "intro" will not be indented.
2. The #intro style applies to all paragraphs.
Answer: False
#intro style applies to only those paragraphs whose id is "intro". That is the paragraphs with id="intro" will have the #intro styles applied.
3. Text in the paragraph with the id="intro" attribute is blue.
Answer: False
As we didn't specify any style related to the text color in #intro, the paragraphs with the id="intro" will have the text color as black which is the default color.
4. Text in the paragraph with the id="intro" attribute is all uppercase and italic.
Answer: True
The Styles
text-transform: uppercase;
font-style: italic;
in #intro specifies that text in the elements with id "intro" will have the text in uppercase and italic.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.