The following HTML code is present on a webpage: <span class="abc"> xyz </span> Which of the following CSS codes could be inserted into this webpage in order to display "xyz" in red color? Check all correct answers. a. .abc { color: red; } b. abc { color: red; } c. #abc { color: red; } d. xyz { color: red; } e. span { color: red; }
Added by Cory R.
Close
Step 1
a. .abc { color: red; } - This is correct. In CSS, a period before a name signifies a class. So, this code will apply to any element with the class "abc", which includes our span. b. abc { color: red; } - This is incorrect. Without a period or a hash before it, Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 73 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
What is the correct HTML for adding a background color? <background> yellow</background> <body bg="yellow"> <body style="background-color: yellow;">
Florencia C.
'Which of the following element is responsible for making the text italic in HTML? a. <italic> b <i> C. <bt> d. <it>'
Sanchit J.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD