Computer scienceFrontendCSSSelectors in Depth

Attribute selectors and Universal selector

Red and blue

Report a typo

Make the text of all paragraphs whose id starts with "plus" red and those with "minus" blue. Use attribute selectors.

Write HTML and CSS code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Paragraphs</title>
</head>
<body>
<p id="plusone">1</p>
<p id="minusone">2</p>
<p id="plustwo">3</p>
<p id="minustwo">4</p>
</body>
</html>
Completed 1 of 5
1 is red
2 is blue
___

Create a free account to access the full topic