How do I do this?
You may only modify the CSS file and should only write one
rule/color to make all the lines the right color. The correct color is inside the text. You are also not allowed to use the comma combinator.
You may only modify the CSS file and should only write one
rule/color to make all the lines the right color. The correct color is inside the text. You are also not allowed to use the comma combinator.
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Right colors</title>
<link rel="stylesheet" href="web1.css">
</head>
<body>
<h1>right colors</h1>
<section class="news news-1">
<h2>im gonna be red</h2>
<p>im gonna be normal color</p>
<h2>im gonna be red</h2>
<p>im gonna be normal color</p>
</section>
<section class="news news-2">
<h2>im gonna be blue</h2>
<p>im gonna be normal color</p>
<p>im gonna be blue</p>
<p>im gonna be normal color</p>
</section>
<section class="news news-3">
<h3>im gonna be purple</h3>
<h3>im gonna be normal color</h3>
<p>im gonna be normal color</p>
<h3>im gonna be purple</h3>
<h3>im gonna be normal color</h3>
</section>
<section class="news news-4">
<h2>im gonna be normal color</h2>
<p>im gonna be green</p>
<p>im gonna be normal color</p>
<h2>im gonna be normal color</h2>
<h2>im gonna be green</h2>
</section>
</body>
</html>
CSS:
.news {
margin-bottom: 1em;
padding-botton: 1em;
border-bottom: 1px solid #cacaca;
}
Last edited by a moderator: