<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.city
{
background-color: black;
color:blanchedalmond;
}
</style>
</head>
<body>
<div class="city">
<h1>Paris</h1>
</div>
<p class="city"><h2>Germany</h2></p>
</body>
</html>
I was learning about classes and now I made two html elements with the same class but css is not applied on the p tag.
Germany
```, thoughshould not contain a
tag? so just remove the
tag and you're all good
– UnidentifiedX Oct 21 '21 at 11:27